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

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
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 7bba6f8e9ba5d17a2b7a84a12964ede1a23261d2..872a3392b8392b6cd23881d69f6311ca92c59d67 100644
--- a/chrome/browser/ui/webui/options/browser_options_handler.cc
+++ b/chrome/browser/ui/webui/options/browser_options_handler.cc
@@ -1793,31 +1793,26 @@ 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::IsHotwordHardwareAvailable() &&
+ 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 =

Powered by Google App Engine
This is Rietveld 408576698