Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3476)

Unified Diff: chrome/browser/extensions/extension_service.cc

Issue 9583036: Revert 124817 - Take extensions out of Profile into a profile-keyed service, ExtensionSystem. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_service.cc
===================================================================
--- chrome/browser/extensions/extension_service.cc (revision 124830)
+++ chrome/browser/extensions/extension_service.cc (working copy)
@@ -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 @@
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 @@
// 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 @@
// 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 @@
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 @@
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 @@
// 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 @@
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::Bind(&ExtensionInfoMap::UnregisterAllExtensionsInProcess,
- system_->info_map(),
+ profile_->GetExtensionInfoMap(),
process->GetID()));
break;
}
« no previous file with comments | « chrome/browser/extensions/extension_service.h ('k') | chrome/browser/extensions/extension_service_unittest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698