Chromium Code Reviews| Index: chrome/browser/extensions/component_loader.cc |
| diff --git a/chrome/browser/extensions/component_loader.cc b/chrome/browser/extensions/component_loader.cc |
| index 9fa07f94f12ef264dfa1a8b809ebde3e1a0366bb..899a5e5ae59a6934d7470cda30877b1558fc671d 100644 |
| --- a/chrome/browser/extensions/component_loader.cc |
| +++ b/chrome/browser/extensions/component_loader.cc |
| @@ -309,8 +309,20 @@ void ComponentLoader::AddHangoutServicesExtension() { |
| void ComponentLoader::AddHotwordHelperExtension() { |
| #if defined(ENABLE_EXTENSIONS) |
| if (HotwordServiceFactory::IsHotwordAllowed(browser_context_)) { |
| - Add(IDR_HOTWORD_HELPER_MANIFEST, |
| - base::FilePath(FILE_PATH_LITERAL("hotword_helper"))); |
| + bool loadedHotwordExtension = false; |
| +#if defined(OS_CHROMEOS) |
|
James Hawkins
2014/08/05 08:59:45
Please get rid of this #ifdef by creating a Chrome
Anand Mistry (off Chromium)
2014/08/06 01:46:07
I've been meaning to change this flag and move it
|
| + CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| + loadedHotwordExtension = |
| + command_line->HasSwitch(chromeos::switches::kEnableOkGoogleVoiceSearch); |
| + if (loadedHotwordExtension) { |
| + Add(IDR_HOTWORD_MANIFEST, |
| + base::FilePath(FILE_PATH_LITERAL("hotword"))); |
| + } |
| +#endif // defined(OS_CHROMEOS) |
| + if (!loadedHotwordExtension) { |
| + Add(IDR_HOTWORD_HELPER_MANIFEST, |
| + base::FilePath(FILE_PATH_LITERAL("hotword_helper"))); |
| + } |
| } |
| #endif |
| } |