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

Unified Diff: chrome/browser/profiles/profile_impl.cc

Issue 7717025: Do not initialize event routers in the Profile Import process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: reset will_import_ value when import complete. Created 9 years, 4 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
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/browser/profiles/profile_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_impl.cc
===================================================================
--- chrome/browser/profiles/profile_impl.cc (revision 97857)
+++ chrome/browser/profiles/profile_impl.cc (working copy)
@@ -505,7 +505,18 @@
// 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.
- extension_service_->InitEventRouters();
+ // 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();
+ }
+ }
}
void ProfileImpl::RegisterComponentExtensions() {
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/browser/profiles/profile_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698