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

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

Issue 2680883003: Temporarily re-introduce load-component-extension switch. (Closed)
Patch Set: --enable-chromedriver -> --enable-automation Created 3 years, 10 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/common/chrome_switches.h » ('j') | chrome/common/chrome_switches.h » ('J')
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <iterator> 10 #include <iterator>
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 432
433 DCHECK(!is_ready()); // Can't redo init. 433 DCHECK(!is_ready()); // Can't redo init.
434 DCHECK_EQ(registry_->enabled_extensions().size(), 0u); 434 DCHECK_EQ(registry_->enabled_extensions().size(), 0u);
435 435
436 // LoadAllExtensions() calls OnLoadedInstalledExtensions(). 436 // LoadAllExtensions() calls OnLoadedInstalledExtensions().
437 component_loader_->LoadAll(); 437 component_loader_->LoadAll();
438 extensions::InstalledLoader(this).LoadAllExtensions(); 438 extensions::InstalledLoader(this).LoadAllExtensions();
439 LoadExtensionsFromCommandLineFlag(switches::kDisableExtensionsExcept); 439 LoadExtensionsFromCommandLineFlag(switches::kDisableExtensionsExcept);
440 if (extensions_enabled_) 440 if (extensions_enabled_)
441 LoadExtensionsFromCommandLineFlag(switches::kLoadExtension); 441 LoadExtensionsFromCommandLineFlag(switches::kLoadExtension);
442 // TODO(samuong): Remove this when ChromeDriver stops supporting Chrome 56.
443 // ChromeDriver has no way of determining the Chrome version until after
444 // launch, so it needs to continue passing load-component-extension until it
445 // stops supporting Chrome 56.
Devlin 2017/02/14 20:44:41 Clarify that this only loads the extension as a re
Devlin 2017/02/14 20:44:41 ETA?
samuong 2017/02/14 21:22:49 Done. ChromeDriver supports the current and previo
446 if (command_line_->HasSwitch(switches::kEnableAutomation))
Devlin 2017/02/14 20:44:41 Maybe something like: if (command_line_->HasSwitch
samuong 2017/02/14 21:22:49 Done.
447 LoadExtensionsFromCommandLineFlag(switches::kLoadComponentExtension);
442 EnabledReloadableExtensions(); 448 EnabledReloadableExtensions();
443 MaybeFinishShutdownDelayed(); 449 MaybeFinishShutdownDelayed();
444 SetReadyAndNotifyListeners(); 450 SetReadyAndNotifyListeners();
445 451
446 // TODO(erikkay): this should probably be deferred to a future point 452 // TODO(erikkay): this should probably be deferred to a future point
447 // rather than running immediately at startup. 453 // rather than running immediately at startup.
448 CheckForExternalUpdates(); 454 CheckForExternalUpdates();
449 455
450 LoadGreylistFromPrefs(); 456 LoadGreylistFromPrefs();
451 } 457 }
(...skipping 2043 matching lines...) Expand 10 before | Expand all | Expand 10 after
2495 } 2501 }
2496 2502
2497 void ExtensionService::OnProfileDestructionStarted() { 2503 void ExtensionService::OnProfileDestructionStarted() {
2498 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs(); 2504 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs();
2499 for (ExtensionIdSet::iterator it = ids_to_unload.begin(); 2505 for (ExtensionIdSet::iterator it = ids_to_unload.begin();
2500 it != ids_to_unload.end(); 2506 it != ids_to_unload.end();
2501 ++it) { 2507 ++it) {
2502 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN); 2508 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN);
2503 } 2509 }
2504 } 2510 }
OLDNEW
« no previous file with comments | « no previous file | chrome/common/chrome_switches.h » ('j') | chrome/common/chrome_switches.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698