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

Unified Diff: chrome/browser/ui/webui/options/browser_options_handler.cc

Issue 992173002: Delete the old hotwording integration. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@hotword-remove-disable-option
Patch Set: Rebase. Created 5 years, 9 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/ui/webui/app_list/start_page_ui.cc ('k') | chrome/browser/ui/webui/voice_search_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c4b4acd083d0dfd6071b1c69e34d731a53fc2c79..22a9b25081909ac797736e6a050fb52fa96cddc3 100644
--- a/chrome/browser/ui/webui/options/browser_options_handler.cc
+++ b/chrome/browser/ui/webui/options/browser_options_handler.cc
@@ -1783,31 +1783,25 @@ void BrowserOptionsHandler::HandleRequestHotwordAvailable(
bool always_on = false;
SigninManagerBase* signin = SigninManagerFactory::GetForProfile(profile);
bool authenticated = signin && signin->IsAuthenticated();
- if (HotwordService::IsExperimentalHotwordingEnabled()) {
- if (HotwordServiceFactory::IsAlwaysOnAvailable() &&
- authenticated) {
- function_name = "BrowserOptions.showHotwordAlwaysOnSection";
- always_on = true;
- // Show the retrain link if always-on is enabled.
- if (profile->GetPrefs()->GetBoolean(
- prefs::kHotwordAlwaysOnSearchEnabled)) {
- web_ui()->CallJavascriptFunction(
- "BrowserOptions.setHotwordRetrainLinkVisible",
- base::FundamentalValue(true));
- }
- } else {
- function_name = "BrowserOptions.showHotwordNoDspSection";
+ if (HotwordServiceFactory::IsAlwaysOnAvailable() && authenticated) {
+ function_name = "BrowserOptions.showHotwordAlwaysOnSection";
+ always_on = true;
+ // Show the retrain link if always-on is enabled.
+ if (profile->GetPrefs()->GetBoolean(
+ prefs::kHotwordAlwaysOnSearchEnabled)) {
+ web_ui()->CallJavascriptFunction(
+ "BrowserOptions.setHotwordRetrainLinkVisible",
+ base::FundamentalValue(true));
}
} else {
- function_name = "BrowserOptions.showHotwordSection";
+ function_name = "BrowserOptions.showHotwordNoDspSection";
}
// Audio history should be displayed if it's enabled regardless of the
// hotword error state if the user is signed in. If the user is not signed
// in, audio history is meaningless. This is only displayed if always-on
// hotwording is available.
- if (HotwordService::IsExperimentalHotwordingEnabled() &&
- authenticated && always_on) {
+ if (authenticated && always_on) {
std::string user_display_name = signin->GetAuthenticatedUsername();
DCHECK(!user_display_name.empty());
base::string16 audio_history_state =
« no previous file with comments | « chrome/browser/ui/webui/app_list/start_page_ui.cc ('k') | chrome/browser/ui/webui/voice_search_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698