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

Unified Diff: chrome/browser/resources/settings/people_page/password_prompt_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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/settings/people_page/password_prompt_dialog.js
diff --git a/chrome/browser/resources/settings/people_page/password_prompt_dialog.js b/chrome/browser/resources/settings/people_page/password_prompt_dialog.js
index c9ee712d9f2a969299bdf1a13ffb34554bbc4802..2d3035ada0de5db9508492a177a31178f9f8d82b 100644
--- a/chrome/browser/resources/settings/people_page/password_prompt_dialog.js
+++ b/chrome/browser/resources/settings/people_page/password_prompt_dialog.js
@@ -99,9 +99,9 @@ Polymer({
attached: function() {
this.writeUma_(LockScreenProgress.START_SCREEN_LOCK);
this.$.dialog.showModal();
- this.async(function() {
+ this.async(() => {
this.$.passwordInput.focus();
- }.bind(this));
+ });
},
/** @private */
@@ -143,10 +143,10 @@ Polymer({
var password = this.password_;
this.password_ = '';
- this.setModes = function(modes, credentials, onComplete) {
+ this.setModes = (modes, credentials, onComplete) => {
this.quickUnlockPrivate_.setModes(
password, modes, credentials, onComplete);
- }.bind(this);
+ };
function clearSetModes() {
// Reset the password so that any cached references to this.setModes
@@ -187,12 +187,12 @@ Polymer({
checkAccountPassword_: function(onCheck) {
// We check the account password by trying to update the active set of quick
// unlock modes without changing any credentials.
- this.quickUnlockPrivate_.getActiveModes(function(modes) {
+ this.quickUnlockPrivate_.getActiveModes(modes => {
var credentials =
/** @type {!Array<string>} */ (Array(modes.length).fill(''));
this.quickUnlockPrivate_.setModes(
this.password_, modes, credentials, onCheck);
- }.bind(this));
+ });
}
});

Powered by Google App Engine
This is Rietveld 408576698