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

Side by Side Diff: chrome/browser/extensions/extension_service.cc

Issue 12670013: Out-of-process import on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: extract some more CLs Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/extension_service.h" 5 #include "chrome/browser/extensions/extension_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 #include <set> 9 #include <set>
10 10
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 blacklist, 401 blacklist,
402 update_frequency)); 402 update_frequency));
403 } 403 }
404 404
405 component_loader_.reset( 405 component_loader_.reset(
406 new extensions::ComponentLoader(this, 406 new extensions::ComponentLoader(this,
407 profile->GetPrefs(), 407 profile->GetPrefs(),
408 g_browser_process->local_state())); 408 g_browser_process->local_state()));
409 409
410 if (extensions_enabled_) { 410 if (extensions_enabled_) {
411 CHECK(!ProfileManager::IsImportProcess(*command_line));
412 extensions::ExternalProviderImpl::CreateExternalProviders( 411 extensions::ExternalProviderImpl::CreateExternalProviders(
413 this, profile_, &external_extension_providers_); 412 this, profile_, &external_extension_providers_);
414 } 413 }
415 414
416 // Set this as the ExtensionService for extension sorting to ensure it 415 // Set this as the ExtensionService for extension sorting to ensure it
417 // cause syncs if required. 416 // cause syncs if required.
418 extension_prefs_->extension_sorting()->SetExtensionService(this); 417 extension_prefs_->extension_sorting()->SetExtensionService(this);
419 418
420 #if defined(ENABLE_EXTENSIONS) 419 #if defined(ENABLE_EXTENSIONS)
421 extension_action_storage_manager_.reset( 420 extension_action_storage_manager_.reset(
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 return NULL; 554 return NULL;
556 } 555 }
557 556
558 void ExtensionService::Init() { 557 void ExtensionService::Init() {
559 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 558 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
560 559
561 DCHECK(!ready_); // Can't redo init. 560 DCHECK(!ready_); // Can't redo init.
562 DCHECK_EQ(extensions_.size(), 0u); 561 DCHECK_EQ(extensions_.size(), 0u);
563 562
564 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); 563 const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
565
566 CHECK(!ProfileManager::IsImportProcess(*cmd_line));
567
568 if (cmd_line->HasSwitch(switches::kInstallFromWebstore) || 564 if (cmd_line->HasSwitch(switches::kInstallFromWebstore) ||
569 cmd_line->HasSwitch(switches::kLimitedInstallFromWebstore)) { 565 cmd_line->HasSwitch(switches::kLimitedInstallFromWebstore)) {
570 // The sole purpose of this launch is to install a new extension from CWS 566 // The sole purpose of this launch is to install a new extension from CWS
571 // and immediately terminate: loading already installed extensions is 567 // and immediately terminate: loading already installed extensions is
572 // unnecessary and may interfere with the inline install dialog (e.g. if an 568 // unnecessary and may interfere with the inline install dialog (e.g. if an
573 // extension listens to onStartup and opens a window). 569 // extension listens to onStartup and opens a window).
574 SetReadyAndNotifyListeners(); 570 SetReadyAndNotifyListeners();
575 } else { 571 } else {
576 // TODO(mek): It might be cleaner to do the FinishDelayedInstallInfo stuff 572 // TODO(mek): It might be cleaner to do the FinishDelayedInstallInfo stuff
577 // here instead of in installedloader. 573 // here instead of in installedloader.
(...skipping 2506 matching lines...) Expand 10 before | Expand all | Expand 10 after
3084 } 3080 }
3085 3081
3086 void ExtensionService::AddUpdateObserver(extensions::UpdateObserver* observer) { 3082 void ExtensionService::AddUpdateObserver(extensions::UpdateObserver* observer) {
3087 update_observers_.AddObserver(observer); 3083 update_observers_.AddObserver(observer);
3088 } 3084 }
3089 3085
3090 void ExtensionService::RemoveUpdateObserver( 3086 void ExtensionService::RemoveUpdateObserver(
3091 extensions::UpdateObserver* observer) { 3087 extensions::UpdateObserver* observer) {
3092 update_observers_.RemoveObserver(observer); 3088 update_observers_.RemoveObserver(observer);
3093 } 3089 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698