Bug 1435098 - Gate flashinfobar list on the plugins.show_infobar. r?bytesized,r?gcp draft
authorFrancois Marier <francois@mozilla.com>
Fri, 02 Feb 2018 13:30:28 -0800
changeset 751830 9bae3b5fc82fc5fb382cce1f11e3d48af201d4e2
parent 748899 fd995039d89708923b5673ecebc652967d40bd4e
push id98070
push userfmarier@mozilla.com
push dateTue, 06 Feb 2018 23:54:40 +0000
reviewersbytesized, gcp
bugs1435098
milestone60.0a1
Bug 1435098 - Gate flashinfobar list on the plugins.show_infobar. r?bytesized,r?gcp The list of sites to suppress flash infobars on should not be downloaded from shavar unless the infobar feature is enabled. MozReview-Commit-ID: BjkS5vWiilg
toolkit/components/url-classifier/SafeBrowsing.jsm
--- a/toolkit/components/url-classifier/SafeBrowsing.jsm
+++ b/toolkit/components/url-classifier/SafeBrowsing.jsm
@@ -61,16 +61,17 @@ this.SafeBrowsing = {
       log("Already initialized");
       return;
     }
 
     Services.prefs.addObserver("browser.safebrowsing", this);
     Services.prefs.addObserver("privacy.trackingprotection", this);
     Services.prefs.addObserver("urlclassifier", this);
     Services.prefs.addObserver("plugins.flashBlock.enabled", this);
+    Services.prefs.addObserver("plugins.show_infobar", this);
 
     this.readPrefs();
     this.addMozEntries();
 
     this.controlUpdateChecking();
     this.initialized = true;
 
     log("init() finished");
@@ -146,17 +147,17 @@ this.SafeBrowsing = {
   phishingEnabled:      false,
   malwareEnabled:       false,
   downloadsEnabled:     false,
   passwordsEnabled:     false,
   trackingEnabled:      false,
   blockedEnabled:       false,
   trackingAnnotations:  false,
   flashBlockEnabled:    false,
-  flashInfobarListEnabled: true,
+  flashInfobarListEnabled: false,
 
   phishingLists:                [],
   malwareLists:                 [],
   downloadBlockLists:           [],
   downloadAllowLists:           [],
   passwordAllowLists:           [],
   trackingProtectionLists:      [],
   trackingProtectionWhitelists: [],
@@ -226,16 +227,17 @@ this.SafeBrowsing = {
     this.phishingEnabled = Services.prefs.getBoolPref("browser.safebrowsing.phishing.enabled");
     this.malwareEnabled = Services.prefs.getBoolPref("browser.safebrowsing.malware.enabled");
     this.downloadsEnabled = Services.prefs.getBoolPref("browser.safebrowsing.downloads.enabled");
     this.passwordsEnabled = Services.prefs.getBoolPref("browser.safebrowsing.passwords.enabled");
     this.trackingEnabled = Services.prefs.getBoolPref("privacy.trackingprotection.enabled") || Services.prefs.getBoolPref("privacy.trackingprotection.pbmode.enabled");
     this.blockedEnabled = Services.prefs.getBoolPref("browser.safebrowsing.blockedURIs.enabled");
     this.trackingAnnotations = Services.prefs.getBoolPref("privacy.trackingprotection.annotate_channels");
     this.flashBlockEnabled = Services.prefs.getBoolPref("plugins.flashBlock.enabled");
+    this.flashInfobarListEnabled = Services.prefs.getBoolPref("plugins.show_infobar", false);
 
     let flashAllowTable, flashAllowExceptTable, flashTable,
         flashExceptTable, flashSubDocTable,
         flashSubDocExceptTable;
 
     let obsoleteLists;
     // Make a copy of the original lists before we re-read the prefs.
     if (this.initialized) {