Bug 881804 (part 6) - Plumb browser UI into predictive network actions to allow clearing data. r=ttaubert r=mossop f=gavin
authorNicholas Hurley <hurley@todesschaf.org>
Fri, 25 Oct 2013 14:57:00 -0700
changeset 166122 17dbbb898b80c601b46d45988c87773b8b69c8a6
parent 166121 dbad5acdc1c732cfa64d935996fa6199eb990478
child 166123 5f38b1bd33582b5ef240209b41c75a0d6df06c14
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersttaubert, mossop
bugs881804
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 881804 (part 6) - Plumb browser UI into predictive network actions to allow clearing data. r=ttaubert r=mossop f=gavin
browser/base/content/sanitize.js
toolkit/forgetaboutsite/ForgetAboutSite.jsm
--- a/browser/base/content/sanitize.js
+++ b/browser/base/content/sanitize.js
@@ -222,16 +222,22 @@ Sanitizer.prototype = {
 
         // Clear last URL of the Open Web Location dialog
         var prefs = Components.classes["@mozilla.org/preferences-service;1"]
                               .getService(Components.interfaces.nsIPrefBranch);
         try {
           prefs.clearUserPref("general.open_location.last_url");
         }
         catch (e) { }
+
+        try {
+          var seer = Components.classes["@mozilla.org/network/seer;1"]
+                               .getService(Components.interfaces.nsINetworkSeer);
+          seer.reset();
+        } catch (e) { }
       },
 
       get canClear()
       {
         // bug 347231: Always allow clearing history due to dependencies on
         // the browser:purge-session-history notification. (like error console)
         return true;
       }
--- a/toolkit/forgetaboutsite/ForgetAboutSite.jsm
+++ b/toolkit/forgetaboutsite/ForgetAboutSite.jsm
@@ -214,10 +214,16 @@ this.ForgetAboutSite = {
 
     // Content Preferences
     let cps2 = Cc["@mozilla.org/content-pref/service;1"].
                getService(Ci.nsIContentPrefService2);
     cps2.removeBySubdomain(aDomain, null, {
       handleCompletion: function() onContentPrefsRemovalFinished(),
       handleError: function() {}
     });
+
+    // Predictive network data - like cache, no way to clear this per
+    // domain, so just trash it all
+    let ns = Cc["@mozilla.org/network/seer;1"].
+             getService(Ci.nsINetworkSeer);
+    ns.reset();
   }
 };