Bug 1433172 - Drop the pref that controls the policy engine. r=mossop

The policy engine should always be enabled, with no way to disable it.

MozReview-Commit-ID: 9HGew1S33q1

--HG--
extra : rebase_source : 419aaf6f445f0726850e4b106bd26b596f1ffa31
This commit is contained in:
Felipe Gomes 2018-03-21 13:28:06 -03:00
Родитель 1fdb02785a
Коммит f22deadf4e
8 изменённых файлов: 0 добавлений и 21 удалений

Просмотреть файл

@ -1736,10 +1736,6 @@ pref("browser.chrome.errorReporter.logLevel", "Error");
pref("browser.chrome.errorReporter.infoURL",
"https://support.mozilla.org/1/firefox/%VERSION%/%OS%/%LOCALE%/nightly-error-collection");
#ifdef EARLY_BETA_OR_EARLIER
pref("browser.policies.enabled", true);
#endif
// Normandy client preferences
pref("app.normandy.api_url", "https://normandy.cdn.mozilla.net/api/v1");
pref("app.normandy.dev_mode", false);

Просмотреть файл

@ -27,10 +27,6 @@ const PREF_ALTERNATE_PATH = "browser.policies.alternatePath";
const MAGIC_TEST_ROOT_PREFIX = "<test-root>";
const PREF_TEST_ROOT = "mochitest.testRoot";
// This pref is meant to be temporary: it will only be used while we're
// testing this feature without rolling it out officially. When the
// policy engine is released, this pref should be removed.
const PREF_ENABLED = "browser.policies.enabled";
const PREF_LOGLEVEL = "browser.policies.loglevel";
// To force disallowing enterprise-only policies during tests
@ -81,11 +77,6 @@ EnterprisePoliciesManager.prototype = {
_xpcom_factory: EnterprisePoliciesFactory,
_initialize() {
if (!Services.prefs.getBoolPref(PREF_ENABLED, false)) {
this.status = Ci.nsIEnterprisePolicies.INACTIVE;
return;
}
let provider = this._chooseProvider();
if (!provider) {

Просмотреть файл

@ -1,6 +1,4 @@
[DEFAULT]
prefs =
browser.policies.enabled=true
support-files =
head.js
config_popups_cookies_addons_flash.json

Просмотреть файл

@ -2,7 +2,6 @@
prefs =
app.update.enabled=true
app.update.auto=true
browser.policies.enabled=true
browser.policies.alternatePath='<test-root>/browser/components/enterprisepolicies/tests/browser/disable_app_update/config_disable_app_update.json'
support-files =
config_disable_app_update.json

Просмотреть файл

@ -1,6 +1,5 @@
[DEFAULT]
prefs =
browser.policies.enabled=true
browser.policies.alternatePath='<test-root>/browser/components/enterprisepolicies/tests/browser/disable_default_bookmarks/bookmarks_policies.json'
support-files =
bookmarks_policies.json

Просмотреть файл

@ -1,6 +1,5 @@
[DEFAULT]
prefs =
browser.policies.enabled=true
browser.policies.alternatePath='<test-root>/browser/components/enterprisepolicies/tests/browser/disable_developer_tools/config_disable_developer_tools.json'
support-files =
config_disable_developer_tools.json

Просмотреть файл

@ -1,6 +1,5 @@
[DEFAULT]
prefs =
browser.policies.enabled=true
browser.policies.alternatePath='<test-root>/browser/components/enterprisepolicies/tests/browser/disable_fxscreenshots/config_disable_fxscreenshots.json'
extensions.screenshots.disabled=false
support-files =

Просмотреть файл

@ -11,10 +11,8 @@ ChromeUtils.import("resource://testing-common/EnterprisePolicyTesting.jsm");
// Setting PREF_DISABLE_SECURITY tells the policy engine that we are in testing
// mode and enables restarting the policy engine without restarting the browser.
Services.prefs.setBoolPref(PREF_DISABLE_SECURITY, true);
Services.prefs.setBoolPref("browser.policies.enabled", true);
registerCleanupFunction(() => {
Services.prefs.clearUserPref(PREF_DISABLE_SECURITY);
Services.prefs.clearUserPref("browser.policies.enabled");
});
Services.policies; // Load policy engine