commit 7d0d47db46531a32c88db85323cd771761b8bb5d
Author: Kathy Brade <brade(a)pearlcrescent.com>
Date: Wed Apr 15 14:09:53 2020 -0400
Revert "Bug 30575: Don't allow enterprise policies in Tor Browser"
This reverts commit d362cff17d44a82534ea553cbf50fa76906cc218.
---
.../enterprisepolicies/EnterprisePolicies.js | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/toolkit/components/enterprisepolicies/EnterprisePolicies.js b/toolkit/components/enterprisepolicies/EnterprisePolicies.js
index dd43d31cb3b0..db77b4717736 100644
--- a/toolkit/components/enterprisepolicies/EnterprisePolicies.js
+++ b/toolkit/components/enterprisepolicies/EnterprisePolicies.js
@@ -88,9 +88,25 @@ EnterprisePoliciesManager.prototype = {
),
_initialize() {
- // We don't want to have any enterprise policies in Tor Browser enabled as
- // those can affect proxy settings etc. See: e.g. #30575.
- this.status = Ci.nsIEnterprisePolicies.INACTIVE;
+ let provider = this._chooseProvider();
+
+ if (!provider) {
+ this.status = Ci.nsIEnterprisePolicies.INACTIVE;
+ return;
+ }
+
+ if (provider.failed) {
+ this.status = Ci.nsIEnterprisePolicies.FAILED;
+ return;
+ }
+
+ this.status = Ci.nsIEnterprisePolicies.ACTIVE;
+ this._parsedPolicies = {};
+ Services.telemetry.scalarSet(
+ "policies.count",
+ Object.keys(provider.policies).length
+ );
+ this._activatePolicies(provider.policies);
},
_chooseProvider() {