Back out c237f02b3578 (bug 946296) because it broke mochitest-metro-chrome
authorMatt Brubeck <mbrubeck@mozilla.com>
Wed, 11 Dec 2013 18:46:53 -0800
changeset 160133 5fba9c37392d00e5adcd7a20cfd6549fcfaf19d4
parent 160132 e61d36bd385f0efc23ae3f11fd0ffcb90078cf7a
child 160134 64271555c89dfc23d8fc9e46ad03bceceff1d57b
push id1672
push userkvijayan@mozilla.com
push dateThu, 12 Dec 2013 20:08:00 +0000
bugs946296
milestone29.0a1
backs outc237f02b357857d7321903d09b4542abdcbeb2e8
Back out c237f02b3578 (bug 946296) because it broke mochitest-metro-chrome
browser/metro/profile/metro.js
toolkit/mozapps/extensions/AddonManager.jsm
toolkit/mozapps/extensions/test/xpcshell/test_default_providers_pref.js
toolkit/mozapps/extensions/test/xpcshell/xpcshell-shared.ini
--- a/browser/metro/profile/metro.js
+++ b/browser/metro/profile/metro.js
@@ -196,18 +196,16 @@ pref("signon.rememberSignons", true);
 // this will automatically enable inline spellchecking (if it is available) for
 // editable elements in HTML
 // 0 = spellcheck nothing
 // 1 = check multi-line controls [default]
 // 2 = check multi/single line controls
 pref("layout.spellcheckDefault", 1);
 
 /* extension manager and xpinstall */
-// Completely disable extensions
-pref("extensions.defaultProviders.enabled", false);
 // Disable all add-on locations other than the profile
 pref("extensions.enabledScopes", 1);
 // Auto-disable any add-ons that are "dropped in" to the profile
 pref("extensions.autoDisableScopes", 1);
 // Disable add-on installation via the web-exposed APIs
 pref("xpinstall.enabled", false);
 pref("xpinstall.whitelist.add", "addons.mozilla.org");
 pref("extensions.autoupdate.enabled", false);
--- a/toolkit/mozapps/extensions/AddonManager.jsm
+++ b/toolkit/mozapps/extensions/AddonManager.jsm
@@ -18,17 +18,16 @@ if ("@mozilla.org/xre/app-info;1" in Cc)
   if (runtime.processType != Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT) {
     // Refuse to run in child processes.
     throw new Error("You cannot use the AddonManager in child processes!");
   }
 }
 
 
 const PREF_BLOCKLIST_PINGCOUNTVERSION = "extensions.blocklist.pingCountVersion";
-const PREF_DEFAULT_PROVIDERS_ENABLED  = "extensions.defaultProviders.enabled";
 const PREF_EM_UPDATE_ENABLED          = "extensions.update.enabled";
 const PREF_EM_LAST_APP_VERSION        = "extensions.lastAppVersion";
 const PREF_EM_LAST_PLATFORM_VERSION   = "extensions.lastPlatformVersion";
 const PREF_EM_AUTOUPDATE_DEFAULT      = "extensions.update.autoUpdateDefault";
 const PREF_EM_STRICT_COMPATIBILITY    = "extensions.strictCompatibility";
 const PREF_EM_CHECK_UPDATE_SECURITY   = "extensions.checkUpdateSecurity";
 const PREF_EM_UPDATE_BACKGROUND_URL   = "extensions.update.background.url";
 const PREF_APP_UPDATE_ENABLED         = "app.update.enabled";
@@ -539,32 +538,25 @@ var AddonManagerInternal = {
     } catch (e) {}
     Services.prefs.addObserver(PREF_EM_AUTOUPDATE_DEFAULT, this, false);
 
     try {
       gHotfixID = Services.prefs.getCharPref(PREF_EM_HOTFIX_ID);
     } catch (e) {}
     Services.prefs.addObserver(PREF_EM_HOTFIX_ID, this, false);
 
-    let defaultProvidersEnabled = true;
-    try {
-      defaultProvidersEnabled = Services.prefs.getBoolPref(PREF_DEFAULT_PROVIDERS_ENABLED);
-    } catch (e) {}
-
     // Ensure all default providers have had a chance to register themselves
-    if (defaultProvidersEnabled) {
-      DEFAULT_PROVIDERS.forEach(function(url) {
-        try {
-          Components.utils.import(url, {});
-        }
-        catch (e) {
-          ERROR("Exception loading default provider \"" + url + "\"", e);
-        }
-      });
-    }
+    DEFAULT_PROVIDERS.forEach(function(url) {
+      try {
+        Components.utils.import(url, {});
+      }
+      catch (e) {
+        ERROR("Exception loading default provider \"" + url + "\"", e);
+      }
+    });
 
     // Load any providers registered in the category manager
     let catman = Cc["@mozilla.org/categorymanager;1"].
                  getService(Ci.nsICategoryManager);
     let entries = catman.enumerateCategory(CATEGORY_PROVIDER_MODULE);
     while (entries.hasMoreElements()) {
       let entry = entries.getNext().QueryInterface(Ci.nsISupportsCString).data;
       let url = catman.getCategoryEntry(CATEGORY_PROVIDER_MODULE, entry);
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/xpcshell/test_default_providers_pref.js
+++ /dev/null
@@ -1,13 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// Tests the extensions.defaultProviders.enabled pref which turns
-// off the default XPIProvider and LightweightThemeManager.
-
-function run_test() {
-  Services.prefs.setBoolPref("extensions.defaultProviders.enabled", false);
-  createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9.2");
-  startupManager();
-  do_check_false(AddonManager.isInstallEnabled("application/x-xpinstall"));
-  Services.prefs.clearUserPref("extensions.defaultProviders.enabled");
-}
--- a/toolkit/mozapps/extensions/test/xpcshell/xpcshell-shared.ini
+++ b/toolkit/mozapps/extensions/test/xpcshell/xpcshell-shared.ini
@@ -143,17 +143,16 @@ fail-if = os == "android"
 [test_cacheflush.js]
 [test_checkcompatibility.js]
 [test_childprocess.js]
 [test_ChromeManifestParser.js]
 [test_compatoverrides.js]
 [test_corrupt.js]
 [test_corrupt_strictcompat.js]
 [test_corruptfile.js]
-[test_default_providers_pref.js]
 [test_dictionary.js]
 [test_langpack.js]
 [test_disable.js]
 [test_distribution.js]
 [test_dss.js]
 # Bug 676992: test consistently fails on Android
 fail-if = os == "android"
 [test_duplicateplugins.js]