Chromium Code Reviews| 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); |
| } |
| } |