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

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

Issue 8872031: Fix race condition in extension service that causes extensions installed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created tracking bug, update comment Created 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_service.cc
===================================================================
--- chrome/browser/extensions/extension_service.cc (revision 114409)
+++ chrome/browser/extensions/extension_service.cc (working copy)
@@ -553,12 +553,19 @@
component_loader_->LoadAll();
extensions::InstalledLoader(this).LoadAllExtensions();
- // TODO(erikkay) this should probably be deferred to a future point
- // rather than running immediately at startup.
- CheckForExternalUpdates();
+ // If we are running in the import process, don't bother initializing the
+ // extension service since this can interfere with the main browser process
+ // that is already running an extension service for this profile.
+ // TODO(aa): can we start up even less of ExtensionService?
+ // http://crbug.com/107636
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kImport)) {
+ // TODO(erikkay) this should probably be deferred to a future point
+ // rather than running immediately at startup.
+ CheckForExternalUpdates();
- // TODO(erikkay) this should probably be deferred as well.
- GarbageCollectExtensions();
+ // TODO(erikkay) this should probably be deferred as well.
+ GarbageCollectExtensions();
+ }
}
bool ExtensionService::UpdateExtension(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698