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

Unified Diff: chrome/browser/profiles/profile_impl.cc

Issue 8898025: Extend --load-extension commandline to accept multiple (comma-separated) extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: space Created 9 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/extension_startup_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_impl.cc
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index 6574cd7c78e7b50247fd641e1eff7f01cf7a2209..2545d7b9ee6d6d73c0c8aa3a421d1c20cef61120 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -463,10 +463,16 @@ void ProfileImpl::InitExtensions(bool extensions_enabled) {
// Load any extensions specified with --load-extension.
// TODO(yoz): Seems like this should move into ExtensionService::Init.
if (command_line->HasSwitch(switches::kLoadExtension)) {
- FilePath path = command_line->GetSwitchValuePath(
+ CommandLine::StringType path_list = command_line->GetSwitchValueNative(
switches::kLoadExtension);
- extensions::UnpackedInstaller::Create(extension_service_.get())->
- LoadFromCommandLine(path);
+ StringTokenizerT<CommandLine::StringType,
+ CommandLine::StringType::const_iterator> t(path_list,
+ FILE_PATH_LITERAL(","));
+ scoped_refptr<extensions::UnpackedInstaller> installer =
+ extensions::UnpackedInstaller::Create(extension_service_.get());
+ while (t.GetNext()) {
+ installer->LoadFromCommandLine(FilePath(t.token()));
+ }
}
}
« no previous file with comments | « chrome/browser/extensions/extension_startup_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698