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

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

Issue 11572036: Do not load extension system in the Profile import process. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rollback to patchset 10 Created 8 years 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
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/browser/first_run/first_run.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_system.cc
diff --git a/chrome/browser/extensions/extension_system.cc b/chrome/browser/extensions/extension_system.cc
index 1a6cda5fce809b66eb6f4b05312abdc62b95cb7d..8aaf8783e7aa9f37a00e3b0b85b2227bf4838447 100644
--- a/chrome/browser/extensions/extension_system.cc
+++ b/chrome/browser/extensions/extension_system.cc
@@ -202,17 +202,14 @@ void ExtensionSystemImpl::Shared::Init(bool extensions_enabled) {
// initialized (see issue 40144). Now that bookmarks aren't imported and
// the event routers need to be initialized for every profile individually,
// initialize them with the extension service.
- // If this profile is being created as part of the import process, never
- // initialize the event routers. If import is going to run in a separate
- // process (the profile itself is on the main process), wait for import to
- // finish before initializing the routers.
- if (!command_line->HasSwitch(switches::kImport) &&
- !command_line->HasSwitch(switches::kImportFromFile)) {
- if (g_browser_process->profile_manager()->will_import()) {
- extension_service_->InitEventRoutersAfterImport();
- } else {
- extension_service_->InitEventRouters();
- }
+ // If import is going to run in a separate process (the profile itself is on
+ // the main process), wait for import to finish before initializing the
+ // routers.
+ CHECK(!ProfileManager::IsImportProcess(*command_line));
+ if (g_browser_process->profile_manager()->will_import()) {
+ extension_service_->InitEventRoutersAfterImport();
+ } else {
+ extension_service_->InitEventRouters();
}
extension_warning_service_.reset(new ExtensionWarningService(profile_));
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/browser/first_run/first_run.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698