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

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: Rebase onto 442183002 Created 6 years, 4 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 db9e40d6bba6868346242bdb0f704326813c01cc..fceeeab2aadcb059dfa35f996298585393ac4d44 100644
--- a/chrome/browser/extensions/component_loader.cc
+++ b/chrome/browser/extensions/component_loader.cc
@@ -308,8 +308,14 @@ 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")));
+ CommandLine* command_line = CommandLine::ForCurrentProcess();
+ if (command_line->HasSwitch(switches::kEnableBuiltInHotword)) {
+ Add(IDR_HOTWORD_MANIFEST,
+ base::FilePath(FILE_PATH_LITERAL("hotword")));
+ } else {
+ Add(IDR_HOTWORD_HELPER_MANIFEST,
+ base::FilePath(FILE_PATH_LITERAL("hotword_helper")));
+ }
}
#endif
}

Powered by Google App Engine
This is Rietveld 408576698