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({ ...@@ -52,14 +52,14 @@ Polymer({
* @private * @private
*/ */
onLaunchGuestTap_: function(event) { onLaunchGuestTap_: function(event) {
this.browserProxy_.areAllProfilesLocked().then(function(allProfilesLocked) { this.browserProxy_.areAllProfilesLocked().then(allProfilesLocked => {
if (!allProfilesLocked || this.isForceSigninEnabled_) { if (!allProfilesLocked || this.isForceSigninEnabled_) {
this.browserProxy_.launchGuestUser(); this.browserProxy_.launchGuestUser();
} else { } else {
document.querySelector('error-dialog') document.querySelector('error-dialog')
.show(this.i18n('browseAsGuestAllProfilesLockedError')); .show(this.i18n('browseAsGuestAllProfilesLockedError'));
} }
}.bind(this)); });
}, },
/** /**
...@@ -68,7 +68,7 @@ Polymer({ ...@@ -68,7 +68,7 @@ Polymer({
* @private * @private
*/ */
onAddUserTap_: function(event) { onAddUserTap_: function(event) {
this.browserProxy_.areAllProfilesLocked().then(function(allProfilesLocked) { this.browserProxy_.areAllProfilesLocked().then(allProfilesLocked => {
if (!allProfilesLocked || this.isForceSigninEnabled_) { if (!allProfilesLocked || this.isForceSigninEnabled_) {
// Event is caught by user-manager-pages. // Event is caught by user-manager-pages.
this.fire('change-page', {page: 'create-user-page'}); this.fire('change-page', {page: 'create-user-page'});
...@@ -76,6 +76,6 @@ Polymer({ ...@@ -76,6 +76,6 @@ Polymer({
document.querySelector('error-dialog') document.querySelector('error-dialog')
.show(this.i18n('addProfileAllProfilesLockedError')); .show(this.i18n('addProfileAllProfilesLockedError'));
} }
}.bind(this)); });
} }
}); });
...@@ -154,9 +154,9 @@ Polymer({ ...@@ -154,9 +154,9 @@ Polymer({
'create-profile-warning', this.handleMessage_.bind(this)); 'create-profile-warning', this.handleMessage_.bind(this));
this.addWebUIListener( this.addWebUIListener(
'create-profile-error', this.handleMessage_.bind(this)); 'create-profile-error', this.handleMessage_.bind(this));
this.addWebUIListener('profile-icons-received', function(icons) { this.addWebUIListener('profile-icons-received', icons => {
this.availableIcons_ = icons; this.availableIcons_ = icons;
}.bind(this)); });
this.addWebUIListener( this.addWebUIListener(
'profile-defaults-received', this.handleProfileDefaults_.bind(this)); 'profile-defaults-received', this.handleProfileDefaults_.bind(this));
this.addWebUIListener( 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