Commit ef1adc91 authored by Johnathan Nightingale's avatar Johnathan Nightingale
Browse files

Re-land pref fix for Clear Recent History. b=453440 r=gavin a=blocking-firefox3.1

parent 1631e764
Loading
Loading
Loading
Loading
+20 −1
Original line number Diff line number Diff line
@@ -102,10 +102,17 @@
        
        sanitize: function ()
        {
          // Update pref values before handing off to the sanitizer (bug 453440)
          this.updatePrefs();
          var s = new Sanitizer();
          s.ignoreTimespan = false;
          s.prefDomain = "privacy.cpd.";
          try {
            s.sanitize();
          } catch (er) {
            Components.utils.reportError("Exception during sanitize: " + er);
          }
          return true;
        },
        
        onReadGeneric: function ()
@@ -155,6 +162,18 @@
          if (history.checked)
            downloads.checked = true;
        },
        
        updatePrefs : function ()
        {
          var tsPref = document.getElementById("privacy.sanitize.timeSpan");
          Sanitizer.prefs.setIntPref("timeSpan", tsPref.value);
          var sanitizePreferences = document.getElementById("sanitizePreferences");
          var prefs = sanitizePreferences.rootBranch;
          for (var i = 0; i < sanitizePreferences.childNodes.length; ++i) {
            var p = sanitizePreferences.childNodes[i];
            prefs.setBoolPref(p.name, p.value);
          }
        }
      };
    ]]>
    </script>