Bug 1366496 - Switch usages of browser.safebrowsing.enabled to browser.safebrowsing.phishing.enabled after bug 1025965. r=frg, a=IanN SEA248b1_2017021701_RELBRANCH
authorrsx11m <rsx11m.pub@gmail.com>
Sat, 20 May 2017 10:18:03 -0500
branchSEA248b1_2017021701_RELBRANCH
changeset 31405 99c5e35f2ea3fbe38e092522c113a5f6bd436923
parent 31404 383c01f825e95d6e69a11b8d12b5fad45f68a7ec
child 31406 669d7c50501383237263cb927948b05270539f00
push id1
push userclokep@gmail.com
push dateMon, 07 May 2018 22:45:56 +0000
treeherdercomm-esr60@57eacde5ef40 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfrg, IanN
bugs1366496, 1025965
Bug 1366496 - Switch usages of browser.safebrowsing.enabled to browser.safebrowsing.phishing.enabled after bug 1025965. r=frg, a=IanN
suite/browser/browser-prefs.js
suite/common/pref/pref-security.xul
suite/common/src/nsSuiteGlue.js
--- a/suite/browser/browser-prefs.js
+++ b/suite/browser/browser-prefs.js
@@ -810,18 +810,18 @@ pref("services.sync.prefs.sync.browser.d
 pref("services.sync.prefs.sync.browser.download.manager.closeWhenDone", true);
 pref("services.sync.prefs.sync.browser.download.manager.retention", true);
 pref("services.sync.prefs.sync.browser.download.manager.showWhenStarting", true);
 pref("services.sync.prefs.sync.browser.download.manager.scanWhenDone", true);
 pref("services.sync.prefs.sync.browser.formfill.enable", true);
 pref("services.sync.prefs.sync.browser.link.open_external", true);
 pref("services.sync.prefs.sync.browser.link.open_newwindow", true);
 pref("services.sync.prefs.sync.browser.offline-apps.notify", true);
-pref("services.sync.prefs.sync.browser.safebrowsing.enabled", true);
 pref("services.sync.prefs.sync.browser.safebrowsing.malware.enabled", true);
+pref("services.sync.prefs.sync.browser.safebrowsing.phishing.enabled", true);
 pref("services.sync.prefs.sync.browser.search.update", true);
 pref("services.sync.prefs.sync.browser.sessionstore.max_concurrent_tabs", true);
 pref("services.sync.prefs.sync.browser.startup.homepage", true);
 pref("services.sync.prefs.sync.browser.startup.page", true);
 pref("services.sync.prefs.sync.browser.tabs.autoHide", true);
 pref("services.sync.prefs.sync.browser.tabs.closeButtons", true);
 pref("services.sync.prefs.sync.browser.tabs.loadInBackground", true);
 pref("services.sync.prefs.sync.browser.tabs.warnOnClose", true);
--- a/suite/common/pref/pref-security.xul
+++ b/suite/common/pref/pref-security.xul
@@ -31,18 +31,18 @@
       <preference id="geo.enabled"
                   name="geo.enabled"
                   type="bool"/>
 
       <!-- Safe Browsing -->
       <preference id="browser.safebrowsing.malware.enabled"
                   name="browser.safebrowsing.malware.enabled"
                   type="bool"/>
-      <preference id="browser.safebrowsing.enabled"
-                  name="browser.safebrowsing.enabled"
+      <preference id="browser.safebrowsing.phishing.enabled"
+                  name="browser.safebrowsing.phishing.enabled"
                   type="bool"/>
     </preferences>
 
     <!-- User Tracking -->
     <groupbox id="trackingGroup">
       <caption label="&tracking.label;"/>
 
       <description>&trackingIntro.label;</description>
@@ -86,12 +86,12 @@
       <description>&safeBrowsingIntro.label;</description>
       <checkbox id="blockAttackSites"
                 label="&blockAttackSites.label;"
                 accesskey="&blockAttackSites.accesskey;"
                 preference="browser.safebrowsing.malware.enabled"/>
       <checkbox id="blockWebForgeries"
                 label="&blockWebForgeries.label;"
                 accesskey="&blockWebForgeries.accesskey;"
-                preference="browser.safebrowsing.enabled"/>
+                preference="browser.safebrowsing.phishing.enabled"/>
     </groupbox>
   </prefpane>
 </overlay>
--- a/suite/common/src/nsSuiteGlue.js
+++ b/suite/common/src/nsSuiteGlue.js
@@ -1014,16 +1014,24 @@ SuiteGlue.prototype = {
     // to the default "don't say anything").
     try {
       if (Services.prefs.getIntPref("privacy.donottrackheader.value") != 1) {
         Services.prefs.clearUserPref("privacy.donottrackheader.enabled");
         Services.prefs.clearUserPref("privacy.donottrackheader.value");
       }
     } catch (ex) {}
 
+    // Migration of disabled safebrowsing-phishing setting after pref renaming.
+    try {
+      if (!Services.prefs.getBoolPref("browser.safebrowsing.enabled")) {
+        Services.prefs.setBoolPref("browser.safebrowsing.phishing.enabled", false);
+        Services.prefs.clearUserPref("browser.safebrowsing.enabled");
+      }
+    } catch (ex) {}
+
     // Migration of document-color preference which changed from boolean to
     // tri-state; 0=always but not accessibility themes, 1=always, 2=never
     try {
       if (!Services.prefs.getBoolPref("browser.display.use_document_colors")) {
         Services.prefs.setIntPref("browser.display.document_color_use", 2);
         Services.prefs.clearUserPref("browser.display.use_document_colors");
       }
     } catch (ex) {}