Commit f536c4c8 authored by dpapad's avatar dpapad Committed by Commit Bot

MD user-manager: Convert all usages of .bind(this) to use ES6 arrow function.

Bug: 747596
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I28e93a4b0be176718df12048fed66e4d696bd4de
Reviewed-on: https://chromium-review.googlesource.com/597111Reviewed-by: default avatarDave Schuyler <dschuyler@chromium.org>
Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491535}
parent 782e8936
......@@ -52,14 +52,14 @@ Polymer({
* @private
*/
onLaunchGuestTap_: function(event) {
this.browserProxy_.areAllProfilesLocked().then(function(allProfilesLocked) {
this.browserProxy_.areAllProfilesLocked().then(allProfilesLocked => {
if (!allProfilesLocked || this.isForceSigninEnabled_) {
this.browserProxy_.launchGuestUser();
} else {
document.querySelector('error-dialog')
.show(this.i18n('browseAsGuestAllProfilesLockedError'));
}
}.bind(this));
});
},
/**
......@@ -68,7 +68,7 @@ Polymer({
* @private
*/
onAddUserTap_: function(event) {
this.browserProxy_.areAllProfilesLocked().then(function(allProfilesLocked) {
this.browserProxy_.areAllProfilesLocked().then(allProfilesLocked => {
if (!allProfilesLocked || this.isForceSigninEnabled_) {
// Event is caught by user-manager-pages.
this.fire('change-page', {page: 'create-user-page'});
......@@ -76,6 +76,6 @@ Polymer({
document.querySelector('error-dialog')
.show(this.i18n('addProfileAllProfilesLockedError'));
}
}.bind(this));
});
}
});
......@@ -154,9 +154,9 @@ Polymer({
'create-profile-warning', this.handleMessage_.bind(this));
this.addWebUIListener(
'create-profile-error', this.handleMessage_.bind(this));
this.addWebUIListener('profile-icons-received', function(icons) {
this.addWebUIListener('profile-icons-received', icons => {
this.availableIcons_ = icons;
}.bind(this));
});
this.addWebUIListener(
'profile-defaults-received', this.handleProfileDefaults_.bind(this));
this.addWebUIListener(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment