| Index: chrome/browser/extensions/extension_service.cc
|
| diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
|
| index 0a3c1bd9f78f75a8350e9a7e3fcd7181beb6bf58..937234183792db3ce6c60fbbd1a69db8d961ebd3 100644
|
| --- a/chrome/browser/extensions/extension_service.cc
|
| +++ b/chrome/browser/extensions/extension_service.cc
|
| @@ -412,11 +412,9 @@ ExtensionService::ExtensionService(Profile* profile,
|
| app_notification_manager_->Init();
|
|
|
| if (extensions_enabled_) {
|
| - if (!command_line->HasSwitch(switches::kImport) &&
|
| - !command_line->HasSwitch(switches::kImportFromFile)) {
|
| - extensions::ExternalProviderImpl::CreateExternalProviders(
|
| - this, profile_, &external_extension_providers_);
|
| - }
|
| + CHECK(!ProfileManager::IsImportProcess(*command_line));
|
| + extensions::ExternalProviderImpl::CreateExternalProviders(
|
| + this, profile_, &external_extension_providers_);
|
| }
|
|
|
| // Set this as the ExtensionService for extension sorting to ensure it
|
| @@ -603,24 +601,17 @@ void ExtensionService::Init() {
|
| wipeout_is_active_ = false; // Wipeout is only on during load.
|
| }
|
|
|
| - // 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) &&
|
| - !CommandLine::ForCurrentProcess()->HasSwitch(switches::kImportFromFile)) {
|
| - if (g_browser_process->profile_manager() &&
|
| - g_browser_process->profile_manager()->will_import()) {
|
| - RegisterForImportFinished();
|
| - } else {
|
| - // TODO(erikkay) this should probably be deferred to a future point
|
| - // rather than running immediately at startup.
|
| - CheckForExternalUpdates();
|
| + CHECK(!ProfileManager::IsImportProcess(*CommandLine::ForCurrentProcess()));
|
| + if (g_browser_process->profile_manager() &&
|
| + g_browser_process->profile_manager()->will_import()) {
|
| + RegisterForImportFinished();
|
| + } else {
|
| + // 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();
|
| }
|
|
|
| if (extension_prefs_->NeedsStorageGarbageCollection()) {
|
|
|