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

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

Issue 17296003: Remove import process workarounds from ExtensionService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback, more workarounds removed Created 7 years, 6 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.h ('k') | chrome/browser/extensions/extension_system.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_service.cc
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index c08866d6bcc7749963cd65fe9a1f1fedde5f80d1..d4f0e9a51096108c4dbe0aa4f7ad198b33e30823 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -457,33 +457,6 @@ ExtensionService::~ExtensionService() {
}
}
-void ExtensionService::InitEventRoutersAfterImport() {
- RegisterForImportFinished();
-}
-
-void ExtensionService::RegisterForImportFinished() {
- if (!registrar_.IsRegistered(this, chrome::NOTIFICATION_IMPORT_FINISHED,
- content::Source<Profile>(profile_))) {
- registrar_.Add(this, chrome::NOTIFICATION_IMPORT_FINISHED,
- content::Source<Profile>(profile_));
- }
-}
-
-void ExtensionService::InitAfterImport() {
- startup_metric_utils::ScopedSlowStartupUMA
- scoped_timer("Startup.SlowStartupExtensionServiceInitAfterImport");
asargent_no_longer_on_chrome 2013/06/19 19:39:05 FYI, the folks working on chrome slow startup may
- component_loader_->LoadAll();
-
- CheckForExternalUpdates();
-
- GarbageCollectExtensions();
-
- // Idempotent, so although there is a possible race if the import
- // process finished sometime in the middle of ProfileImpl::InitExtensions,
- // it cannot happen twice.
- InitEventRouters();
-}
-
void ExtensionService::InitEventRouters() {
if (event_routers_initialized_)
return;
@@ -559,29 +532,20 @@ void ExtensionService::Init() {
} else {
// TODO(mek): It might be cleaner to do the FinishDelayedInstallInfo stuff
// here instead of in installedloader.
- if (g_browser_process->profile_manager() &&
- g_browser_process->profile_manager()->will_import()) {
- // Do not load any component extensions, since they may conflict with the
- // import process.
-
- extensions::InstalledLoader(this).LoadAllExtensions();
- SetReadyAndNotifyListeners();
- RegisterForImportFinished();
- } else {
- // In this case, LoadAllExtensions() calls OnLoadedInstalledExtensions().
- component_loader_->LoadAll();
- extensions::InstalledLoader(this).LoadAllExtensions();
- SetReadyAndNotifyListeners();
- // TODO(erikkay) this should probably be deferred to a future point
- // rather than running immediately at startup.
- CheckForExternalUpdates();
+ // LoadAllExtensions() calls OnLoadedInstalledExtensions().
+ component_loader_->LoadAll();
+ extensions::InstalledLoader(this).LoadAllExtensions();
+ SetReadyAndNotifyListeners();
- base::MessageLoop::current()->PostDelayedTask(
- FROM_HERE,
- base::Bind(&ExtensionService::GarbageCollectExtensions, AsWeakPtr()),
- base::TimeDelta::FromSeconds(kGarbageCollectStartupDelay));
- }
+ // TODO(erikkay) this should probably be deferred to a future point
+ // rather than running immediately at startup.
+ CheckForExternalUpdates();
+
+ base::MessageLoop::current()->PostDelayedTask(
+ FROM_HERE,
+ base::Bind(&ExtensionService::GarbageCollectExtensions, AsWeakPtr()),
+ base::TimeDelta::FromSeconds(kGarbageCollectStartupDelay));
if (extension_prefs_->NeedsStorageGarbageCollection()) {
GarbageCollectIsolatedStorage();
@@ -2642,10 +2606,6 @@ void ExtensionService::Observe(int type,
process->GetID()));
break;
}
- case chrome::NOTIFICATION_IMPORT_FINISHED: {
- InitAfterImport();
- break;
- }
case chrome::NOTIFICATION_EXTENSION_HOST_DESTROYED: {
extensions::ExtensionHost* host =
content::Details<extensions::ExtensionHost>(details).ptr();
« no previous file with comments | « chrome/browser/extensions/extension_service.h ('k') | chrome/browser/extensions/extension_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698