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

Unified Diff: chrome/browser/extensions/component_loader.cc

Issue 423083002: Add new hotword extension for built-in hotword triggering. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
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
}

Powered by Google App Engine
This is Rietveld 408576698