diff options
Diffstat (limited to 'chromium/chrome/browser/resources/settings/google_assistant_page/google_assistant_page.js')
-rw-r--r-- | chromium/chrome/browser/resources/settings/google_assistant_page/google_assistant_page.js | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/chromium/chrome/browser/resources/settings/google_assistant_page/google_assistant_page.js b/chromium/chrome/browser/resources/settings/google_assistant_page/google_assistant_page.js index 559d65184d1..5237e0168f7 100644 --- a/chromium/chrome/browser/resources/settings/google_assistant_page/google_assistant_page.js +++ b/chromium/chrome/browser/resources/settings/google_assistant_page/google_assistant_page.js @@ -15,8 +15,8 @@ const DspHotwordState = { /** * Indicates user's activity control consent status. * - * Note: This should be kept in sync with ash::mojom::ConsentStatus in - * ash/public/mojom/voice_interaction_controller.mojom + * Note: This should be kept in sync with ConsentStatus in + * chromeos/services/assistant/public/cpp/assistant_prefs.h * @enum {number} */ const ConsentStatus = { @@ -97,12 +97,6 @@ Polymer({ }, /** @private */ - hotwordDefaultOn_: { - type: Boolean, - value: false, - }, - - /** @private */ dspHotwordState_: { type: DspHotwordState, } @@ -166,20 +160,17 @@ Polymer({ this.setPrefValue('settings.voice_interaction.hotword.enabled', true); this.setPrefValue( 'settings.voice_interaction.hotword.always_on', false); - this.hotwordDefaultOn_ = true; this.browserProxy_.syncVoiceModelStatus(); break; case DspHotwordState.ALWAYS_ON: this.setPrefValue('settings.voice_interaction.hotword.enabled', true); this.setPrefValue('settings.voice_interaction.hotword.always_on', true); - this.hotwordDefaultOn_ = false; this.browserProxy_.syncVoiceModelStatus(); break; case DspHotwordState.OFF: this.setPrefValue('settings.voice_interaction.hotword.enabled', false); this.setPrefValue( 'settings.voice_interaction.hotword.always_on', false); - this.hotwordDefaultOn_ = false; break; default: console.error('Invalid Dsp hotword settings state'); @@ -205,6 +196,7 @@ Polymer({ this.refreshDspHotwordState_(); this.shouldShowVoiceMatchSettings_ = + !loadTimeData.getBoolean('voiceMatchDisabled') && this.getPref('settings.voice_interaction.hotword.enabled.value') && (this.getPref( 'settings.voice_interaction.activity_control.consent_status.value') == @@ -220,14 +212,11 @@ Polymer({ /** @private */ refreshDspHotwordState_: function() { if (!this.getPref('settings.voice_interaction.hotword.enabled.value')) { - this.hotwordDefaultOn_ = false; this.dspHotwordState_ = DspHotwordState.OFF; } else if (this.getPref( 'settings.voice_interaction.hotword.always_on.value')) { - this.hotwordDefaultOn_ = false; this.dspHotwordState_ = DspHotwordState.ALWAYS_ON; } else { - this.hotwordDefaultOn_ = true; this.dspHotwordState_ = DspHotwordState.DEFAULT_ON; } |