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

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. 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
« no previous file with comments | « chrome/browser/browser_resources.grd ('k') | chrome/browser/extensions/external_component_loader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/component_loader.cc
diff --git a/chrome/browser/extensions/component_loader.cc b/chrome/browser/extensions/component_loader.cc
index fb8adeb801438b42d2e5c84da56522812af4e174..c29cad3e217462270cb6e85c6157372ccbf74e9b 100644
--- a/chrome/browser/extensions/component_loader.cc
+++ b/chrome/browser/extensions/component_loader.cc
@@ -304,8 +304,14 @@ void ComponentLoader::AddHangoutServicesExtension() {
void ComponentLoader::AddHotwordHelperExtension() {
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::kEnableExperimentalHotwording)) {
+ Add(IDR_HOTWORD_MANIFEST,
+ base::FilePath(FILE_PATH_LITERAL("hotword")));
+ } else {
+ Add(IDR_HOTWORD_HELPER_MANIFEST,
+ base::FilePath(FILE_PATH_LITERAL("hotword_helper")));
+ }
}
}
« no previous file with comments | « chrome/browser/browser_resources.grd ('k') | chrome/browser/extensions/external_component_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698