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

Unified Diff: chrome/browser/resources/hotword_audio_verification/main.js

Issue 559303002: Hotword Audio Verification app: control the hotword settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@launch-state
Patch Set: Rebase Created 6 years, 3 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
Index: chrome/browser/resources/hotword_audio_verification/main.js
diff --git a/chrome/browser/resources/hotword_audio_verification/main.js b/chrome/browser/resources/hotword_audio_verification/main.js
index c180e0732dc54560cc21b9c5057cbc87be29400c..46f870947c87c9928049df0c2ceb89e9712b7e08 100644
--- a/chrome/browser/resources/hotword_audio_verification/main.js
+++ b/chrome/browser/resources/hotword_audio_verification/main.js
@@ -40,7 +40,6 @@ document.addEventListener('DOMContentLoaded', function() {
});
$('hw-agree-button').addEventListener('click', function(e) {
- // TODO(kcarattini): Set the Audio History setting.
flow.advanceStep();
e.stopPropagation();
});
@@ -48,8 +47,13 @@ document.addEventListener('DOMContentLoaded', function() {
// TODO(kcarattini): Remove this once speech training is implemented. The
// way to get to the next page will be to complete the speech training.
$('training').addEventListener('click', function(e) {
- // TODO(kcarattini): Set the always-on-hotword setting.
- flow.advanceStep();
+ if (chrome.hotwordPrivate.setAudioLoggingEnabled)
+ chrome.hotwordPrivate.setAudioLoggingEnabled(true, function() {});
+
+ if (chrome.hotwordPrivate.setHotwordAlwaysOnSearchEnabled) {
+ chrome.hotwordPrivate.setHotwordAlwaysOnSearchEnabled(true,
+ flow.advanceStep.bind(flow));
+ }
e.stopPropagation();
});
« no previous file with comments | « chrome/browser/resources/hotword_audio_verification/flow.js ('k') | chrome/browser/resources/options/browser_options.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698