Chromium Code Reviews| Index: chrome/browser/ui/webui/options/browser_options_handler.cc |
| diff --git a/chrome/browser/ui/webui/options/browser_options_handler.cc b/chrome/browser/ui/webui/options/browser_options_handler.cc |
| index d7c47ca2c4986ee9904f4989f91bc0b9fc5ea158..c5a8b566117f242eb3ebafd879076a59ec4c15ef 100644 |
| --- a/chrome/browser/ui/webui/options/browser_options_handler.cc |
| +++ b/chrome/browser/ui/webui/options/browser_options_handler.cc |
| @@ -1205,6 +1205,21 @@ void BrowserOptionsHandler::OnTemplateURLServiceChanged() { |
| template_url_service_->is_default_search_managed() || |
| template_url_service_->IsExtensionControlledDefaultSearch())); |
| + if (model_urls[default_index]->HasGoogleBaseURLs( |
| + template_url_service_->search_terms_data())) { |
|
Dan Beam
2014/12/04 20:44:07
looks confusingly like it's inside the conditional
rpetterson
2014/12/04 23:20:29
Done.
|
| + // If the user has chosen Google as the default search provider, make |
| + // hotwording as an option available again. |
| + HandleRequestHotwordAvailable(nullptr); |
|
Dan Beam
2014/12/04 20:44:07
how does the hotword section get unhidden?
rpetterson
2014/12/04 23:20:29
That function -- HandleRequestHotwordAvailable --
|
| + } else { |
| + // If the user has chosen a default search provide other than Google, turn |
| + // off hotwording since other providers don't provide that functionality. |
| + web_ui()->CallJavascriptFunction("BrowserOptions.hideHotwordSection"); |
| + HotwordService* hotword_service = |
| + HotwordServiceFactory::GetForProfile(Profile::FromWebUI(web_ui())); |
|
Dan Beam
2014/12/04 20:44:07
4\s indent on continuations
rpetterson
2014/12/04 23:20:28
Argh. Thank you. I have to figure out a way to get
|
| + if (hotword_service) |
|
Dan Beam
2014/12/04 20:44:07
how often is |hotword_service| null here?
rpetterson
2014/12/04 23:20:29
Mostly in some tests but also any platform/situati
|
| + hotword_service->DisableHotwordPreferences(); |
| + } |
| + |
| SetupExtensionControlledIndicators(); |
| } |