Index: chrome/browser/resources/hotword_audio_verification/flow.js |
diff --git a/chrome/browser/resources/hotword_audio_verification/flow.js b/chrome/browser/resources/hotword_audio_verification/flow.js |
index 9c0c4b016000bd674cc6e4203b8a2cd741e25817..7524c80ec660d45afd44cfd2556c2a7950c860c6 100644 |
--- a/chrome/browser/resources/hotword_audio_verification/flow.js |
+++ b/chrome/browser/resources/hotword_audio_verification/flow.js |
@@ -18,8 +18,7 @@ |
*/ |
var FLOWS = [ |
[START, SPEECH_TRAINING, FINISH], |
- [START, AUDIO_HISTORY, SPEECH_TRAINING, FINISH], |
- [SPEECH_TRAINING, FINISH] |
+ [START, AUDIO_HISTORY, SPEECH_TRAINING, FINISH], [SPEECH_TRAINING, FINISH] |
]; |
/** |
@@ -27,11 +26,7 @@ |
* the same name in hotword_service.h. |
* @enum {number} |
*/ |
- var LaunchMode = { |
- HOTWORD_ONLY: 0, |
- HOTWORD_AND_AUDIO_HISTORY: 1, |
- RETRAIN: 2 |
- }; |
+ var LaunchMode = {HOTWORD_ONLY: 0, HOTWORD_AND_AUDIO_HISTORY: 1, RETRAIN: 2}; |
/** |
* The training state. |
@@ -106,8 +101,7 @@ |
* Listener for the hotword trigger event. |
* @private {Function} |
*/ |
- this.hotwordTriggerListener_ = |
- this.handleHotwordTrigger_.bind(this); |
+ this.hotwordTriggerListener_ = this.handleHotwordTrigger_.bind(this); |
// Listen for the user locking the screen. |
chrome.idle.onStateChanged.addListener( |
@@ -173,8 +167,8 @@ |
this.training_ = false; |
if (chrome.hotwordPrivate.onHotwordTriggered) { |
- chrome.hotwordPrivate.onHotwordTriggered. |
- removeListener(this.hotwordTriggerListener_); |
+ chrome.hotwordPrivate.onHotwordTriggered.removeListener( |
+ this.hotwordTriggerListener_); |
} |
if (chrome.hotwordPrivate.stopTraining) |
chrome.hotwordPrivate.stopTraining(); |
@@ -213,7 +207,7 @@ |
// Set a timeout before focusing the Enable button so that screenreaders |
// have time to announce the error first. |
this.setTimeout_(function() { |
- $('audio-history-agree').focus(); |
+ $('audio-history-agree').focus(); |
}.bind(this), 50); |
}; |
@@ -267,8 +261,8 @@ |
*/ |
Flow.prototype.finishFlow_ = function() { |
if (chrome.hotwordPrivate.setHotwordAlwaysOnSearchEnabled) { |
- chrome.hotwordPrivate.setHotwordAlwaysOnSearchEnabled(true, |
- this.advanceStep.bind(this)); |
+ chrome.hotwordPrivate.setHotwordAlwaysOnSearchEnabled( |
+ true, this.advanceStep.bind(this)); |
} |
}; |
@@ -277,7 +271,7 @@ |
*/ |
Flow.prototype.handleRetry = function() { |
if (!(this.trainingState_ == TrainingState.TIMEOUT || |
- this.trainingState_ == TrainingState.ERROR)) |
+ this.trainingState_ == TrainingState.ERROR)) |
return; |
this.startTraining(); |
@@ -322,9 +316,11 @@ |
var curStep = |
$(this.trainingPagePrefix_ + '-training').querySelector('.listening'); |
- return {current: curStep, |
- index: Array.prototype.indexOf.call(steps, curStep), |
- steps: steps}; |
+ return { |
+ current: curStep, |
+ index: Array.prototype.indexOf.call(steps, curStep), |
+ steps: steps |
+ }; |
}; |
/** |
@@ -531,8 +527,9 @@ |
*/ |
Flow.prototype.startFlowForMode_ = function(state) { |
this.launchMode_ = state.launchMode; |
- assert(state.launchMode >= 0 && state.launchMode < FLOWS.length, |
- 'Invalid Launch Mode.'); |
+ assert( |
+ state.launchMode >= 0 && state.launchMode < FLOWS.length, |
+ 'Invalid Launch Mode.'); |
this.currentFlow_ = FLOWS[state.launchMode]; |
if (state.launchMode == LaunchMode.HOTWORD_ONLY) { |
$('intro-description-audio-history-enabled').hidden = false; |