| Index: chrome/browser/extensions/component_loader.cc
|
| diff --git a/chrome/browser/extensions/component_loader.cc b/chrome/browser/extensions/component_loader.cc
|
| index a1c206aa7ecb1eae84c3bd532d3ca555095acdd9..673acc50315c3fbccee638253c55d027c1a4cb44 100644
|
| --- a/chrome/browser/extensions/component_loader.cc
|
| +++ b/chrome/browser/extensions/component_loader.cc
|
| @@ -86,16 +86,7 @@ ComponentLoader::ComponentLoader(ExtensionServiceInterface* extension_service,
|
| PrefService* local_state)
|
| : profile_prefs_(profile_prefs),
|
| local_state_(local_state),
|
| - extension_service_(extension_service) {
|
| - pref_change_registrar_.Init(profile_prefs);
|
| -
|
| - // This pref is set by policy. We have to watch it for change because on
|
| - // ChromeOS, policy isn't loaded until after the browser process is started.
|
| - pref_change_registrar_.Add(
|
| - prefs::kEnterpriseWebStoreURL,
|
| - base::Bind(&ComponentLoader::AddOrReloadEnterpriseWebStore,
|
| - base::Unretained(this)));
|
| -}
|
| + extension_service_(extension_service) {}
|
|
|
| ComponentLoader::~ComponentLoader() {
|
| ClearAllRegistered();
|
| @@ -284,33 +275,6 @@ void ComponentLoader::AddImageLoaderExtension() {
|
| #endif // defined(IMAGE_LOADER_EXTENSION)
|
| }
|
|
|
| -void ComponentLoader::AddOrReloadEnterpriseWebStore() {
|
| - base::FilePath path(FILE_PATH_LITERAL("enterprise_web_store"));
|
| -
|
| - // Remove the extension if it was already loaded.
|
| - Remove(path);
|
| -
|
| - std::string enterprise_webstore_url =
|
| - profile_prefs_->GetString(prefs::kEnterpriseWebStoreURL);
|
| -
|
| - // Load the extension only if the URL preference is set.
|
| - if (!enterprise_webstore_url.empty()) {
|
| - std::string manifest_contents =
|
| - ResourceBundle::GetSharedInstance().GetRawDataResource(
|
| - IDR_ENTERPRISE_WEBSTORE_MANIFEST).as_string();
|
| -
|
| - // The manifest is missing some values that are provided by policy.
|
| - DictionaryValue* manifest = ParseManifest(manifest_contents);
|
| - if (manifest) {
|
| - std::string name =
|
| - profile_prefs_->GetString(prefs::kEnterpriseWebStoreName);
|
| - manifest->SetString("app.launch.web_url", enterprise_webstore_url);
|
| - manifest->SetString("name", name);
|
| - Add(manifest, path);
|
| - }
|
| - }
|
| -}
|
| -
|
| void ComponentLoader::AddChromeApp() {
|
| #if defined(ENABLE_APP_LIST)
|
| std::string manifest_contents =
|
| @@ -377,13 +341,6 @@ void ComponentLoader::AddDefaultComponentExtensions(
|
|
|
| if (!skip_session_components) {
|
| Add(IDR_WEBSTORE_MANIFEST, base::FilePath(FILE_PATH_LITERAL("web_store")));
|
| -
|
| - // If a URL for the enterprise webstore has been specified, load the
|
| - // component extension. This extension might also be loaded later, because
|
| - // it is specified by policy, and on ChromeOS policies are loaded after
|
| - // the browser process has started.
|
| - AddOrReloadEnterpriseWebStore();
|
| -
|
| AddChromeApp();
|
| }
|
|
|
| @@ -485,17 +442,4 @@ void ComponentLoader::UnloadComponent(ComponentExtensionInfo* component) {
|
| }
|
| }
|
|
|
| -// static
|
| -void ComponentLoader::RegisterUserPrefs(
|
| - user_prefs::PrefRegistrySyncable* registry) {
|
| - registry->RegisterStringPref(
|
| - prefs::kEnterpriseWebStoreURL,
|
| - std::string() /* default_value */,
|
| - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
|
| - registry->RegisterStringPref(
|
| - prefs::kEnterpriseWebStoreName,
|
| - std::string() /* default_value */,
|
| - user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
|
| -}
|
| -
|
| } // namespace extensions
|
|
|