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..154359c63f6df3f4bfb139e30b56f39a98bbc7e0 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,16 @@ 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) { |
Dan Beam
2014/09/23 05:53:38
do you expect this to fail ever?
kcarattini
2014/09/23 06:46:16
No. Changed to assert.
|
+ if (chrome.hotwordPrivate.setAudioLoggingEnabled) { |
Dan Beam
2014/09/23 05:53:38
nit: no curlies
kcarattini
2014/09/23 06:46:16
Done.
|
+ chrome.hotwordPrivate.setAudioLoggingEnabled(true, function() {}); |
+ } |
+ |
+ if (chrome.hotwordPrivate.setHotwordAlwaysOnSearchEnabled) { |
+ chrome.hotwordPrivate.setHotwordAlwaysOnSearchEnabled(true, |
+ flow.advanceStep.bind(flow)); |
+ } |
+ } |
e.stopPropagation(); |
}); |