Commit eead91c0 authored by kcarattini's avatar kcarattini Committed by Commit bot

Hotword: Decouple sometimes and always on prefs when disabling. They can both exist independently.

BUG=

Review URL: https://codereview.chromium.org/1011963002

Cr-Commit-Position: refs/heads/master@{#320896}
parent eba228e0
...@@ -786,14 +786,11 @@ void HotwordService::SetAudioHistoryHandler( ...@@ -786,14 +786,11 @@ void HotwordService::SetAudioHistoryHandler(
void HotwordService::DisableHotwordPreferences() { void HotwordService::DisableHotwordPreferences() {
if (IsSometimesOnEnabled()) { if (IsSometimesOnEnabled()) {
if (profile_->GetPrefs()->HasPrefPath(prefs::kHotwordSearchEnabled)) profile_->GetPrefs()->SetBoolean(prefs::kHotwordSearchEnabled, false);
profile_->GetPrefs()->SetBoolean(prefs::kHotwordSearchEnabled, false); }
} else if (IsAlwaysOnEnabled()) { if (IsAlwaysOnEnabled()) {
if (profile_->GetPrefs()->HasPrefPath( profile_->GetPrefs()->SetBoolean(prefs::kHotwordAlwaysOnSearchEnabled,
prefs::kHotwordAlwaysOnSearchEnabled)) { false);
profile_->GetPrefs()->SetBoolean(prefs::kHotwordAlwaysOnSearchEnabled,
false);
}
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment