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 94ba90e3464125761c9aa6561312594c9cff347f..e650ffaaffe9e93e6b11599158297c57b16e031d 100644 |
| --- a/chrome/browser/search/hotword_service.cc |
| +++ b/chrome/browser/search/hotword_service.cc |
| @@ -743,6 +743,19 @@ void HotwordService::SetAudioHistoryHandler( |
| audio_history_handler_.reset(handler); |
| } |
| +void HotwordService::DisableHotwordPreferences() { |
| + if (IsSometimesOnEnabled()) { |
|
Anand Mistry (off Chromium)
2014/12/05 03:56:51
This will also disable hotwording if the user navi
rpetterson
2014/12/05 04:57:33
So if I understand correctly, you're saying only m
Anand Mistry (off Chromium)
2014/12/05 05:23:52
I think it's more nuanced than that. I think it sh
|
| + 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); |
| + } |
| + } |
| +} |
| + |
| void HotwordService::OnHotwordSearchEnabledChanged( |
| const std::string& pref_name) { |
| DCHECK_EQ(pref_name, std::string(prefs::kHotwordSearchEnabled)); |