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

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: rebase on top of https://codereview.chromium.org/15736014/ Created 7 years, 7 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
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/extensions/extension_system.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 blacklist, 403 blacklist,
404 update_frequency)); 404 update_frequency));
405 } 405 }
406 406
407 component_loader_.reset( 407 component_loader_.reset(
408 new extensions::ComponentLoader(this, 408 new extensions::ComponentLoader(this,
409 profile->GetPrefs(), 409 profile->GetPrefs(),
410 g_browser_process->local_state())); 410 g_browser_process->local_state()));
411 411
412 if (extensions_enabled_) { 412 if (extensions_enabled_) {
413 CHECK(!ProfileManager::IsImportProcess(*command_line));
414 extensions::ExternalProviderImpl::CreateExternalProviders( 413 extensions::ExternalProviderImpl::CreateExternalProviders(
415 this, profile_, &external_extension_providers_); 414 this, profile_, &external_extension_providers_);
416 } 415 }
417 416
418 // Set this as the ExtensionService for extension sorting to ensure it 417 // Set this as the ExtensionService for extension sorting to ensure it
419 // cause syncs if required. 418 // cause syncs if required.
420 extension_prefs_->extension_sorting()->SetExtensionService(this); 419 extension_prefs_->extension_sorting()->SetExtensionService(this);
421 420
422 is_first_run_ = !extension_prefs_->SetAlertSystemFirstRun(); 421 is_first_run_ = !extension_prefs_->SetAlertSystemFirstRun();
423 422
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 return NULL; 558 return NULL;
560 } 559 }
561 560
562 void ExtensionService::Init() { 561 void ExtensionService::Init() {
563 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 562 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
564 563
565 DCHECK(!is_ready()); // Can't redo init. 564 DCHECK(!is_ready()); // Can't redo init.
566 DCHECK_EQ(extensions_.size(), 0u); 565 DCHECK_EQ(extensions_.size(), 0u);
567 566
568 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); 567 const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
569
570 CHECK(!ProfileManager::IsImportProcess(*cmd_line));
571
572 if (cmd_line->HasSwitch(switches::kInstallFromWebstore) || 568 if (cmd_line->HasSwitch(switches::kInstallFromWebstore) ||
573 cmd_line->HasSwitch(switches::kLimitedInstallFromWebstore)) { 569 cmd_line->HasSwitch(switches::kLimitedInstallFromWebstore)) {
574 // The sole purpose of this launch is to install a new extension from CWS 570 // The sole purpose of this launch is to install a new extension from CWS
575 // and immediately terminate: loading already installed extensions is 571 // and immediately terminate: loading already installed extensions is
576 // unnecessary and may interfere with the inline install dialog (e.g. if an 572 // unnecessary and may interfere with the inline install dialog (e.g. if an
577 // extension listens to onStartup and opens a window). 573 // extension listens to onStartup and opens a window).
578 SetReadyAndNotifyListeners(); 574 SetReadyAndNotifyListeners();
579 } else { 575 } else {
580 // TODO(mek): It might be cleaner to do the FinishDelayedInstallInfo stuff 576 // TODO(mek): It might be cleaner to do the FinishDelayedInstallInfo stuff
581 // here instead of in installedloader. 577 // here instead of in installedloader.
(...skipping 2534 matching lines...) Expand 10 before | Expand all | Expand 10 after
3116 } 3112 }
3117 3113
3118 void ExtensionService::AddUpdateObserver(extensions::UpdateObserver* observer) { 3114 void ExtensionService::AddUpdateObserver(extensions::UpdateObserver* observer) {
3119 update_observers_.AddObserver(observer); 3115 update_observers_.AddObserver(observer);
3120 } 3116 }
3121 3117
3122 void ExtensionService::RemoveUpdateObserver( 3118 void ExtensionService::RemoveUpdateObserver(
3123 extensions::UpdateObserver* observer) { 3119 extensions::UpdateObserver* observer) {
3124 update_observers_.RemoveObserver(observer); 3120 update_observers_.RemoveObserver(observer);
3125 } 3121 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/extensions/extension_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698