Bug 714787 - When clearing site permissions, also clear content prefs that keep track of how many times a permission was granted. r=dougt
authorMargaret Leibovic <margaret.leibovic@gmail.com>
Fri, 06 Jan 2012 16:48:29 -0800
changeset 85290 3c05c5afca65c4ef85894157a9dc95613c137f02
parent 85289 b575f4ce92734f304c169f5a88fc22173e0647ce
child 85291 0b102e74b3b8afbd8e0f970304d90696422c0d7f
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdougt
bugs714787
milestone12.0a1
Bug 714787 - When clearing site permissions, also clear content prefs that keep track of how many times a permission was granted. r=dougt
mobile/android/chrome/content/browser.js
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -3708,16 +3708,18 @@ var PermissionsHelper = {
       let logins = Services.logins.findLogins({}, aURI.prePath, "", "");
       for (let i = 0; i < logins.length; i++) {
         Services.logins.removeLogin(logins[i]);
       }
       // Re-set login saving to enabled
       Services.logins.setLoginSavingEnabled(aURI.prePath, true);
     } else {
       Services.perms.remove(aURI.host, aType);
+      // Clear content prefs set in ContentPermissionPrompt.js
+      Services.contentPrefs.removePref(aURI, aType + ".request.remember");
     }
   }
 }
 
 var MasterPassword = {
   pref: "privacy.masterpassword.enabled",
   _tokenName: "",