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

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

Issue 617833003: Remove --install-from-webstore and --limited-install-from-webstore (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/extensions/startup_helper.h » ('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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 384
385 void ExtensionService::Init() { 385 void ExtensionService::Init() {
386 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 386 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
387 387
388 base::Time begin_time = base::Time::Now(); 388 base::Time begin_time = base::Time::Now();
389 389
390 DCHECK(!is_ready()); // Can't redo init. 390 DCHECK(!is_ready()); // Can't redo init.
391 DCHECK_EQ(registry_->enabled_extensions().size(), 0u); 391 DCHECK_EQ(registry_->enabled_extensions().size(), 0u);
392 392
393 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); 393 const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
394 if (cmd_line->HasSwitch(switches::kInstallFromWebstore) || 394 if (cmd_line->HasSwitch(switches::kInstallEphemeralAppFromWebstore)) {
395 cmd_line->HasSwitch(switches::kLimitedInstallFromWebstore)) {
396 // The sole purpose of this launch is to install a new extension from CWS 395 // The sole purpose of this launch is to install a new extension from CWS
397 // and immediately terminate: loading already installed extensions is 396 // and immediately terminate: loading already installed extensions is
398 // unnecessary and may interfere with the inline install dialog (e.g. if an 397 // unnecessary and may interfere with the inline install dialog (e.g. if an
399 // extension listens to onStartup and opens a window). 398 // extension listens to onStartup and opens a window).
400 SetReadyAndNotifyListeners(); 399 SetReadyAndNotifyListeners();
401 } else { 400 } else {
402 // LoadAllExtensions() calls OnLoadedInstalledExtensions(). 401 // LoadAllExtensions() calls OnLoadedInstalledExtensions().
403 component_loader_->LoadAll(); 402 component_loader_->LoadAll();
404 extensions::InstalledLoader(this).LoadAllExtensions(); 403 extensions::InstalledLoader(this).LoadAllExtensions();
405 404
(...skipping 1949 matching lines...) Expand 10 before | Expand all | Expand 10 after
2355 } 2354 }
2356 2355
2357 void ExtensionService::OnProfileDestructionStarted() { 2356 void ExtensionService::OnProfileDestructionStarted() {
2358 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs(); 2357 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs();
2359 for (ExtensionIdSet::iterator it = ids_to_unload.begin(); 2358 for (ExtensionIdSet::iterator it = ids_to_unload.begin();
2360 it != ids_to_unload.end(); 2359 it != ids_to_unload.end();
2361 ++it) { 2360 ++it) {
2362 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN); 2361 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN);
2363 } 2362 }
2364 } 2363 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/startup_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698