diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-09 08:42:11 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-09 08:42:11 +0000 |
commit | e15be2bb4ca057bf5f9c02115d92042717364d42 (patch) | |
tree | 13e6c04987b6c8170efbff37fa32c5b8785d4d2d /chrome/browser/extensions/extension_service.cc | |
parent | 65f8fbbd988207a470e2a399379baa70f4abb282 (diff) | |
download | chromium_src-e15be2bb4ca057bf5f9c02115d92042717364d42.zip chromium_src-e15be2bb4ca057bf5f9c02115d92042717364d42.tar.gz chromium_src-e15be2bb4ca057bf5f9c02115d92042717364d42.tar.bz2 |
Revert "Reland 124817 - Take extensions out of Profile into a profile-keyed service, ExtensionSystem."
I believe this change is causing failures in
[SocketApiTest.Socket{TCP,UDP}Extension.
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/9648026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125815 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_service.cc')
-rw-r--r-- | chrome/browser/extensions/extension_service.cc | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc index b2d7eec..3c0eb11 100644 --- a/chrome/browser/extensions/extension_service.cc +++ b/chrome/browser/extensions/extension_service.cc @@ -52,8 +52,6 @@ #include "chrome/browser/extensions/extension_sorting.h" #include "chrome/browser/extensions/extension_special_storage_policy.h" #include "chrome/browser/extensions/extension_sync_data.h" -#include "chrome/browser/extensions/extension_system.h" -#include "chrome/browser/extensions/extension_system_factory.h" #include "chrome/browser/extensions/extension_updater.h" #include "chrome/browser/extensions/extension_web_ui.h" #include "chrome/browser/extensions/extension_webnavigation_api.h" @@ -377,7 +375,6 @@ ExtensionService::ExtensionService(Profile* profile, bool autoupdate_enabled, bool extensions_enabled) : profile_(profile), - system_(ExtensionSystemFactory::GetForProfile(profile)), extension_prefs_(extension_prefs), settings_frontend_(extensions::SettingsFrontend::Create(profile)), pending_extension_manager_(*ALLOW_THIS_IN_INITIALIZER_LIST(this)), @@ -695,8 +692,7 @@ void ExtensionService::ReloadExtension(const std::string& extension_id) { // If the extension has an inspector open for its background page, detach // the inspector and hang onto a cookie for it, so that we can reattach // later. - // TODO(yoz): this is not incognito-safe! - ExtensionProcessManager* manager = system_->process_manager(); + ExtensionProcessManager* manager = profile_->GetExtensionProcessManager(); ExtensionHost* host = manager->GetBackgroundHostForExtension(extension_id); if (host && DevToolsAgentHostRegistry::HasDevToolsAgentHost( host->render_view_host())) { @@ -985,7 +981,7 @@ void ExtensionService::NotifyExtensionLoaded(const Extension* extension) { // that the request context doesn't yet know about. The profile is responsible // for ensuring its URLRequestContexts appropriately discover the loaded // extension. - system_->RegisterExtensionWithRequestContexts(extension); + profile_->RegisterExtensionWithRequestContexts(extension); // Tell renderers about the new extension, unless it's a theme (renderers // don't need to know about themes). @@ -1132,7 +1128,7 @@ void ExtensionService::NotifyExtensionUnloaded( host->Send(new ExtensionMsg_Unloaded(extension->id())); } - system_->UnregisterExtensionWithRequestContexts(extension->id(), reason); + profile_->UnregisterExtensionWithRequestContexts(extension->id(), reason); profile_->GetExtensionSpecialStoragePolicy()-> RevokeRightsForExtension(extension); @@ -1933,7 +1929,7 @@ void ExtensionService::UnloadExtension( if (!extension) { // In case the extension may have crashed/uninstalled. Allow the profile to // clean up its RequestContexts. - system_->UnregisterExtensionWithRequestContexts(extension_id, reason); + profile_->UnregisterExtensionWithRequestContexts(extension_id, reason); return; } @@ -1958,7 +1954,7 @@ if (disabled_extensions_.Contains(extension->id())) { // Make sure the profile cleans up its RequestContexts when an already // disabled extension is unloaded (since they are also tracking the disabled // extensions). - system_->UnregisterExtensionWithRequestContexts(extension_id, reason); + profile_->UnregisterExtensionWithRequestContexts(extension_id, reason); return; } @@ -2505,7 +2501,7 @@ void ExtensionService::Observe(int type, BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, base::Bind(&ExtensionInfoMap::UnregisterAllExtensionsInProcess, - system_->info_map(), + profile_->GetExtensionInfoMap(), process->GetID())); break; } |