Chromium Code Reviews| Index: chrome/browser/ui/webui/app_list/start_page_handler.cc |
| diff --git a/chrome/browser/ui/webui/app_list/start_page_handler.cc b/chrome/browser/ui/webui/app_list/start_page_handler.cc |
| index 76ebc29041a8c61935a2a53b6b754b2010710315..1ff81857773922f5199041f8f1d0cfd9cb6b0b20 100644 |
| --- a/chrome/browser/ui/webui/app_list/start_page_handler.cc |
| +++ b/chrome/browser/ui/webui/app_list/start_page_handler.cc |
| @@ -144,7 +144,8 @@ void StartPageHandler::OnHotwordEnabledChanged() { |
| extensions::ExtensionRegistry::ENABLED); |
| if (hotword_extension && |
| hotword_extension->version()->CompareTo( |
| - base::Version(kOldHotwordExtensionVersionString)) <= 0) { |
| + base::Version(kOldHotwordExtensionVersionString)) <= 0 && |
| + !HotwordService::IsExperimentalHotwordingEnabled()) { |
| StartPageService* service = StartPageService::Get(profile); |
| web_ui()->CallJavascriptFunction( |
| "appList.startPage.setHotwordEnabled", |
| @@ -193,9 +194,14 @@ void StartPageHandler::HandleInitialize(const base::ListValue* args) { |
| #endif |
| if (!app_list::switches::IsExperimentalAppListEnabled()) { |
| + bool hotwordEnabled = service->HotwordEnabled(); |
|
Jun Mukai
2014/08/14 22:10:08
variable name style
Anand Mistry (off Chromium)
2014/08/15 00:14:51
Done.
|
| + // If experimental hotwording is enabled, don't enable hotwording in the |
| + // start page, since the hotword extension is taking care of this. |
| + if (HotwordService::IsExperimentalHotwordingEnabled()) |
| + hotwordEnabled = false; |
| web_ui()->CallJavascriptFunction( |
| "appList.startPage.onAppListShown", |
| - base::FundamentalValue(service->HotwordEnabled())); |
| + base::FundamentalValue(hotwordEnabled)); |
| } |
| } |