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

Side by Side Diff: chrome/browser/resources/settings/people_page/setup_fingerprint_dialog.js

Issue 2984843003: MD Settings: Convert all usages of .bind(this) to use ES6 arrow function. (Closed)
Patch Set: Resolve conflicts. Created 3 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.exportPath('settings'); 5 cr.exportPath('settings');
6 6
7 /** 7 /**
8 * The steps in the fingerprint setup flow. 8 * The steps in the fingerprint setup flow.
9 * @enum {number} 9 * @enum {number}
10 */ 10 */
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 * Set the problem message based on the result from the fingerprint scanner. 214 * Set the problem message based on the result from the fingerprint scanner.
215 * @param {!settings.FingerprintResultType} scanResult The result the 215 * @param {!settings.FingerprintResultType} scanResult The result the
216 * fingerprint scanner gives. 216 * fingerprint scanner gives.
217 * @private 217 * @private
218 */ 218 */
219 setProblem_: function(scanResult) { 219 setProblem_: function(scanResult) {
220 this.clearSensorMessageTimeout_(); 220 this.clearSensorMessageTimeout_();
221 switch (scanResult) { 221 switch (scanResult) {
222 case settings.FingerprintResultType.SUCCESS: 222 case settings.FingerprintResultType.SUCCESS:
223 this.problemMessage_ = ''; 223 this.problemMessage_ = '';
224 this.tapSensorMessageTimeoutId_ = setTimeout(function() { 224 this.tapSensorMessageTimeoutId_ = setTimeout(() => {
225 this.problemMessage_ = this.i18n('configureFingerprintLiftFinger'); 225 this.problemMessage_ = this.i18n('configureFingerprintLiftFinger');
226 }.bind(this), SHOW_TAP_SENSOR_MESSAGE_DELAY_MS); 226 }, SHOW_TAP_SENSOR_MESSAGE_DELAY_MS);
227 break; 227 break;
228 case settings.FingerprintResultType.PARTIAL: 228 case settings.FingerprintResultType.PARTIAL:
229 this.problemMessage_ = this.i18n('configureFingerprintPartialData'); 229 this.problemMessage_ = this.i18n('configureFingerprintPartialData');
230 break; 230 break;
231 case settings.FingerprintResultType.INSUFFICIENT: 231 case settings.FingerprintResultType.INSUFFICIENT:
232 this.problemMessage_ = 232 this.problemMessage_ =
233 this.i18n('configureFingerprintInsufficientData'); 233 this.i18n('configureFingerprintInsufficientData');
234 break; 234 break;
235 case settings.FingerprintResultType.SENSOR_DIRTY: 235 case settings.FingerprintResultType.SENSOR_DIRTY:
236 this.problemMessage_ = this.i18n('configureFingerprintSensorDirty'); 236 this.problemMessage_ = this.i18n('configureFingerprintSensorDirty');
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 */ 290 */
291 onAddAnotherFingerprint_: function() { 291 onAddAnotherFingerprint_: function() {
292 this.fire('add-fingerprint'); 292 this.fire('add-fingerprint');
293 this.reset_(); 293 this.reset_();
294 this.$.arc.drawBackgroundCircle(); 294 this.$.arc.drawBackgroundCircle();
295 this.$.arc.drawShadow(10, 0, 0); 295 this.$.arc.drawShadow(10, 0, 0);
296 this.browserProxy_.startEnroll(); 296 this.browserProxy_.startEnroll();
297 }, 297 },
298 }); 298 });
299 })(); 299 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698