From e82afeaa6dce4e20a78742b220f4b6bcad30572a Mon Sep 17 00:00:00 2001 From: Nicholas Hurley Date: Fri, 20 Sep 2013 15:24:07 -0700 Subject: [PATCH] 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 | 6 ++++++ toolkit/forgetaboutsite/ForgetAboutSite.jsm | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/browser/base/content/sanitize.js b/browser/base/content/sanitize.js index 9906b6285fc3..aeb6087cb071 100644 --- a/browser/base/content/sanitize.js +++ b/browser/base/content/sanitize.js @@ -227,6 +227,12 @@ Sanitizer.prototype = { 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() diff --git a/toolkit/forgetaboutsite/ForgetAboutSite.jsm b/toolkit/forgetaboutsite/ForgetAboutSite.jsm index f4e14e09e225..1be2fe0fd56f 100644 --- a/toolkit/forgetaboutsite/ForgetAboutSite.jsm +++ b/toolkit/forgetaboutsite/ForgetAboutSite.jsm @@ -216,5 +216,11 @@ this.ForgetAboutSite = { 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(); } };