Chromium Code Reviews| Index: chrome/browser/profiles/profile_impl.cc |
| diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc |
| index cd280cd25ebf44f85b695fc3996b9f9f9307dd37..8978729da772891c8dbf5be34dbb3652483c747e 100644 |
| --- a/chrome/browser/profiles/profile_impl.cc |
| +++ b/chrome/browser/profiles/profile_impl.cc |
| @@ -12,6 +12,7 @@ |
| #include "base/file_util.h" |
| #include "base/memory/scoped_ptr.h" |
| #include "base/path_service.h" |
| +#include "base/string_tokenizer.h" |
| #include "base/string_util.h" |
| #include "base/utf_string_conversions.h" |
| #include "chrome/browser/autocomplete/autocomplete_classifier.h" |
| @@ -444,6 +445,17 @@ void ProfileImpl::InitExtensions(bool extensions_enabled) { |
| extensions_enabled)); |
| extension_service_->component_loader()->AddDefaultComponentExtensions(); |
| + if (command_line->HasSwitch(switches::kLoadComponentExtension)) { |
| + CommandLine::StringType path_list = command_line->GetSwitchValueNative( |
| + switches::kLoadComponentExtension); |
| + StringTokenizerT<CommandLine::StringType, |
| + CommandLine::StringType::const_iterator> t(path_list, |
| + FILE_PATH_LITERAL(",")); |
| + while (t.GetNext()) { |
| + extension_service_->component_loader()->AddOrReplace( |
|
Aaron Boodman
2011/12/05 22:11:26
How does this work? It seems like it should DCHECK
SeRya
2011/12/06 08:19:27
Now sure why it works. Probably caller code allows
|
| + FilePath(t.token())); |
| + } |
| + } |
| extension_service_->Init(); |
| if (extensions_enabled) { |