Bug 1447353 - If tracking protection explicitly disabled, lock it. r=Felipe, a=jcristau DEVEDITION_60_0b6_BUILD1 DEVEDITION_60_0b6_RELEASE FIREFOX_60_0b6_BUILD1 FIREFOX_60_0b6_RELEASE
authorMichael Kaply <mozilla@kaply.com>
Tue, 20 Mar 2018 13:15:36 -0500
changeset 460314 998a57bd05ada832da0cd78e2db628699afee80e
parent 460313 117ae537ef0d0a989b9505369a28c6a58bdfeae8
child 460315 dbb4439e88593993c0b0689881a77c2bb380064f
push id8903
push userryanvm@gmail.com
push dateThu, 22 Mar 2018 15:20:34 +0000
treeherdermozilla-beta@998a57bd05ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersFelipe, jcristau
bugs1447353
milestone60.0
Bug 1447353 - If tracking protection explicitly disabled, lock it. r=Felipe, a=jcristau MozReview-Commit-ID: Fe2oUOuCJxN
browser/components/enterprisepolicies/Policies.jsm
--- a/browser/components/enterprisepolicies/Policies.jsm
+++ b/browser/components/enterprisepolicies/Policies.jsm
@@ -244,22 +244,27 @@ var Policies = {
   "DontCheckDefaultBrowser": {
     onBeforeUIStartup(manager, param) {
       setAndLockPref("browser.shell.checkDefaultBrowser", false);
     }
   },
 
   "EnableTrackingProtection": {
     onBeforeUIStartup(manager, param) {
-      if (param.Locked) {
-        setAndLockPref("privacy.trackingprotection.enabled", param.Value);
-        setAndLockPref("privacy.trackingprotection.pbmode.enabled", param.Value);
+      if (param.Value) {
+        if (param.Locked) {
+          setAndLockPref("privacy.trackingprotection.enabled", true);
+          setAndLockPref("privacy.trackingprotection.pbmode.enabled", true);
+        } else {
+          setDefaultPref("privacy.trackingprotection.enabled", true);
+          setDefaultPref("privacy.trackingprotection.pbmode.enabled", true);
+        }
       } else {
-        setDefaultPref("privacy.trackingprotection.enabled", param.Value);
-        setDefaultPref("privacy.trackingprotection.pbmode.enabled", param.Value);
+        setAndLockPref("privacy.trackingprotection.enabled", false);
+        setAndLockPref("privacy.trackingprotection.pbmode.enabled", false);
       }
     }
   },
 
   "FlashPlugin": {
     onBeforeUIStartup(manager, param) {
       addAllowDenyPermissions("plugin:flash", param.Allow, param.Block);
     }