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 774273 998a57bd05ada832da0cd78e2db628699afee80e
parent 774272 117ae537ef0d0a989b9505369a28c6a58bdfeae8
child 774274 dbb4439e88593993c0b0689881a77c2bb380064f
push id104369
push usermixedpuppy@gmail.com
push dateWed, 28 Mar 2018 19:17:18 +0000
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);
     }