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

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

Issue 1011963002: Hotword: Decouple sometimes and always on prefs when disabling. They can both exist independently. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments 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 | « no previous file | no next file » | 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 7560a50c93ba348e54618446b38439b29fc2cb16..2755306169c83e646f95e9415af3d131a116d014 100644
--- a/chrome/browser/search/hotword_service.cc
+++ b/chrome/browser/search/hotword_service.cc
@@ -787,14 +787,11 @@ void HotwordService::SetAudioHistoryHandler(
void HotwordService::DisableHotwordPreferences() {
Lei Zhang 2015/03/17 04:55:11 Isn't this the same as: if (IsAlwaysOnEnabled())
kcarattini 2015/03/17 05:07:40 Well, the whole point of decoupling was to make th
Lei Zhang 2015/03/17 05:37:13 Oh, nevermind. I read the CL wrong.
if (IsSometimesOnEnabled()) {
- if (profile_->GetPrefs()->HasPrefPath(prefs::kHotwordSearchEnabled))
- profile_->GetPrefs()->SetBoolean(prefs::kHotwordSearchEnabled, false);
- } else if (IsAlwaysOnEnabled()) {
- if (profile_->GetPrefs()->HasPrefPath(
- prefs::kHotwordAlwaysOnSearchEnabled)) {
- profile_->GetPrefs()->SetBoolean(prefs::kHotwordAlwaysOnSearchEnabled,
- false);
- }
+ profile_->GetPrefs()->SetBoolean(prefs::kHotwordSearchEnabled, false);
+ }
+ if (IsAlwaysOnEnabled()) {
+ profile_->GetPrefs()->SetBoolean(prefs::kHotwordAlwaysOnSearchEnabled,
+ false);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698