Commit 7a161dbd authored by rogerta@chromium.org's avatar rogerta@chromium.org

Fix race condition in extension service that causes extensions installed

concurently with the extension garbage collection to sometimes get marked for
deletion.  The concurrency is between the extension installation in the browser
process and the garbage collection in the import process.

BUG=101935
TEST=Install google chrome and look at the default apps installed in the first
profile.  The icons for all the apps should be correct.  This does not work
with chromium builds since default apps are not installed there.

Review URL: http://codereview.chromium.org/8872031

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114695 0039d316-1c4b-4281-b951-d872f2087c98
parent db543d32
......@@ -552,12 +552,19 @@ void ExtensionService::Init() {
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();
// TODO(erikkay) this should probably be deferred as well.
GarbageCollectExtensions();
// 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();
}
}
bool ExtensionService::UpdateExtension(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment