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

Unified Diff: chrome/browser/search/hotword_service.cc

Issue 599053004: Replace placeholder extension ID for hotwording shared module with ID of module uploaded to the Chr… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix HotwordService::IsServiceAvailable(). Created 6 years, 3 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/resources/hotword/manifest.json ('k') | chrome/common/extensions/extension_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/search/hotword_service.cc
diff --git a/chrome/browser/search/hotword_service.cc b/chrome/browser/search/hotword_service.cc
index f12ef059c4b7384b4f1a159e0a961b94ac319364..0a082cf1ad7d0ced80cc4bb9dfbb42459884b613 100644
--- a/chrome/browser/search/hotword_service.cc
+++ b/chrome/browser/search/hotword_service.cc
@@ -389,8 +389,16 @@ bool HotwordService::IsServiceAvailable() {
ExtensionService* service = system->extension_service();
// Include disabled extensions (true parameter) since it may not be enabled
// if the user opted out.
+ std::string extensionId;
+ if (IsExperimentalHotwordingEnabled()) {
+ // TODO(amistry): Handle reloading on language change as the old extension
+ // does.
+ extensionId = extension_misc::kHotwordSharedModuleId;
+ } else {
+ extensionId = extension_misc::kHotwordExtensionId;
+ }
const extensions::Extension* extension =
- service->GetExtensionById(extension_misc::kHotwordExtensionId, true);
+ service->GetExtensionById(extensionId, true);
if (!extension)
error_message_ = IDS_HOTWORD_GENERIC_ERROR_MESSAGE;
« no previous file with comments | « chrome/browser/resources/hotword/manifest.json ('k') | chrome/common/extensions/extension_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698