[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [torbutton/master] Remove SafeCache preferences.



commit 271ec324139946124be8df5faf2900c48d60882c
Author: Mike Perry <mikeperry-git@xxxxxxxxxx>
Date:   Thu Jun 30 11:22:23 2011 -0700

    Remove SafeCache preferences.
    
    We're going to trim down our prefs soon. We want safecache always-on.
---
 src/chrome/content/pref-privacy.xul   |   31 -------------------------------
 src/chrome/content/preferences.js     |   32 +-------------------------------
 src/chrome/content/preferences.xul    |   16 ----------------
 src/chrome/locale/en/pref-privacy.dtd |    1 -
 src/chrome/locale/en/torbutton.dtd    |    5 -----
 5 files changed, 1 insertions(+), 84 deletions(-)

diff --git a/src/chrome/content/pref-privacy.xul b/src/chrome/content/pref-privacy.xul
deleted file mode 100644
index afa304e..0000000
--- a/src/chrome/content/pref-privacy.xul
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE window [
-<!ENTITY % SSH_prefPrivacyDTD SYSTEM "chrome://torbutton/locale/pref-privacy.dtd">
-%SSH_prefPrivacyDTD;
-]>
-<overlay id="SafeCacheConfigOverlay"
-         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";>
-    <prefwindow id="BrowserPreferences">
-      <prefpane id="panePrivacy">
-        <preferences id="privacyPreferences">
-           <preference id="stanford-safecache.enabled" 
-             name="stanford-safecache.enabled" type="bool"/>
-        </preferences>
-	<groupbox id="historyGroup" />
-	<groupbox id="cookiesGroup" />
-	<groupbox id="privateDataGroup">
-            <hbox id="safeCacheContainer">
-              <image
-                src="chrome://torbutton/skin/stanford-safecache.png"/>
-              <checkbox 
-                preference="stanford-safecache.enabled" 
-                id="enableSafeCache"
-                label="&safeCache.label;"/>
-            </hbox>
-        </groupbox>  
-      </prefpane>
-    </prefwindow>
-
-</overlay>
-
diff --git a/src/chrome/content/preferences.js b/src/chrome/content/preferences.js
index 3a7f99f..a926f36 100644
--- a/src/chrome/content/preferences.js
+++ b/src/chrome/content/preferences.js
@@ -208,24 +208,6 @@ function torbutton_prefs_init(doc) {
         o_torprefs.setBoolPref('block_cache', true);
         o_torprefs.setBoolPref('clear_cache', false);
     }
-    
-    switch(o_torprefs.getIntPref('safecache')) {
-        case 0: // always
-            doc.getElementById("torbutton_safecacheGroup").selectedItem =
-                doc.getElementById('torbutton_safecacheAlways');
-            break;
-        case 1: // during tor
-            doc.getElementById("torbutton_safecacheGroup").selectedItem =
-                doc.getElementById('torbutton_safecacheDuringTor');
-            break;
-        case 2: // never
-            doc.getElementById("torbutton_safecacheGroup").selectedItem =
-                doc.getElementById('torbutton_safecacheNever');
-            break;
-    }
-    
-    doc.getElementById('torbutton_cookie_js_allow').checked = 
-        o_torprefs.getBoolPref('cookie_js_allow');
 
     if(o_torprefs.getBoolPref('clear_cookies')) {
         doc.getElementById('torbutton_cookieGroup').selectedItem = 
@@ -519,19 +501,7 @@ function torbutton_prefs_save(doc) {
 
     o_torprefs.setBoolPref('clear_cache', doc.getElementById('torbutton_clearCache').selected);
     o_torprefs.setBoolPref('block_cache', doc.getElementById('torbutton_blockCache').selected);
-    
-    if(doc.getElementById('torbutton_safecacheGroup').selectedItem ==
-            doc.getElementById('torbutton_safecacheAlways')) {
-        o_torprefs.setIntPref('safecache', 0);
-    } else if(doc.getElementById('torbutton_safecacheGroup').selectedItem ==
-            doc.getElementById('torbutton_safecacheDuringTor')) {
-        o_torprefs.setIntPref('safecache', 1);
-    } else {
-        o_torprefs.setIntPref('safecache', 2);
-    }
-    
-    o_torprefs.setBoolPref('cookie_js_allow', doc.getElementById('torbutton_cookie_js_allow').checked);
-    
+
     o_torprefs.setBoolPref('clear_cookies', doc.getElementById('torbutton_clearCookies').selected);
     o_torprefs.setBoolPref('cookie_jars', doc.getElementById('torbutton_cookieJars').selected);
     o_torprefs.setBoolPref('dual_cookie_jars', doc.getElementById('torbutton_dualCookieJars').selected || doc.getElementById('torbutton_cookieProtections').selected);
diff --git a/src/chrome/content/preferences.xul b/src/chrome/content/preferences.xul
index b7c2d33..1795fc1 100644
--- a/src/chrome/content/preferences.xul
+++ b/src/chrome/content/preferences.xul
@@ -238,22 +238,6 @@
                    label="&torbutton.prefs.block_cache;" 
                    oncommand="torbutton_prefs_set_field_attributes(document)"/>
             </radiogroup>
-            <hbox>
-             <label value="&torbutton.prefs.safecache;" control="torbutton_safecacheGroup"/>
-             <radiogroup align="center" orient="horizontal" id="torbutton_safecacheGroup">
-              <radio id="torbutton_safecacheAlways" 
-                   label="&torbutton.prefs.always;" 
-                   oncommand="torbutton_prefs_set_field_attributes(document)"/>
-              <radio id="torbutton_safecacheDuringTor" 
-                   label="&torbutton.prefs.during_tor;" 
-                   oncommand="torbutton_prefs_set_field_attributes(document)"/>
-              <radio id="torbutton_safecacheNever" 
-                   label="&torbutton.prefs.never;" 
-                   oncommand="torbutton_prefs_set_field_attributes(document)"/>
-             </radiogroup>
-            </hbox>
-            <checkbox id="torbutton_cookie_js_allow" label="&torbutton.prefs.cookie_js_allow;" 
-                  oncommand="torbutton_prefs_set_field_attributes(document)"/>
            </vbox>
           </tabpanel>
           <tabpanel id="cookies">
diff --git a/src/chrome/locale/en/pref-privacy.dtd b/src/chrome/locale/en/pref-privacy.dtd
deleted file mode 100644
index 93aac71..0000000
--- a/src/chrome/locale/en/pref-privacy.dtd
+++ /dev/null
@@ -1 +0,0 @@
-<!ENTITY safeCache.label                 "Use SafeCache to impose cookie policy on cache">
diff --git a/src/chrome/locale/en/torbutton.dtd b/src/chrome/locale/en/torbutton.dtd
index 9416ac0..998eb76 100644
--- a/src/chrome/locale/en/torbutton.dtd
+++ b/src/chrome/locale/en/torbutton.dtd
@@ -136,8 +136,3 @@
 <!ENTITY torbutton.prefs.engine5 "duckduckgo.com">
 <!ENTITY torbutton.prefs.fix_google_srch "Strip platform and language off of Google Search Box queries">
 <!ENTITY torbutton.prefs.transparentTor "Transparent Torification (Requires custom transproxy or Tor router)">
-<!ENTITY torbutton.prefs.safecache "Enforce same-origin policy on cookies and cache:">
-<!ENTITY torbutton.prefs.always "Always">
-<!ENTITY torbutton.prefs.during_tor "During Tor">
-<!ENTITY torbutton.prefs.never "Never">
-<!ENTITY torbutton.prefs.cookie_js_allow "Allow cookies set with Javascript (unknown origin)">



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits