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

Unified Diff: chrome/browser/resources/settings/reset_page/reset_profile_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/reset_page/reset_profile_dialog.js
diff --git a/chrome/browser/resources/settings/reset_page/reset_profile_dialog.js b/chrome/browser/resources/settings/reset_page/reset_profile_dialog.js
index ccbe17a0328be56e8a8c768a668f2d80964e75dd..40827a89e2039073561cebc4129fddefb179dcf5 100644
--- a/chrome/browser/resources/settings/reset_page/reset_profile_dialog.js
+++ b/chrome/browser/resources/settings/reset_page/reset_profile_dialog.js
@@ -72,9 +72,9 @@ Polymer({
ready: function() {
this.browserProxy_ = settings.ResetBrowserProxyImpl.getInstance();
- this.addEventListener('cancel', function() {
+ this.addEventListener('cancel', () => {
this.browserProxy_.onHideResetProfileDialog();
- }.bind(this));
+ });
this.$$('paper-checkbox a')
.addEventListener('tap', this.onShowReportedSettingsTap_.bind(this));
@@ -96,11 +96,11 @@ Polymer({
this.isTriggered_ =
settings.getCurrentRoute() == settings.routes.TRIGGERED_RESET_DIALOG;
if (this.isTriggered_) {
- this.browserProxy_.getTriggeredResetToolName().then(function(name) {
+ this.browserProxy_.getTriggeredResetToolName().then(name => {
this.resetRequestOrigin_ = 'triggeredreset';
this.triggeredResetToolName_ = name;
this.showDialog_();
- }.bind(this));
+ });
} else {
// For the non-triggered reset dialog, a '#cct' hash indicates that the
// reset request came from the Chrome Cleanup Tool by launching Chrome
@@ -124,12 +124,12 @@ Polymer({
this.browserProxy_
.performResetProfileSettings(
this.$.sendSettings.checked, this.resetRequestOrigin_)
- .then(function() {
+ .then(() => {
this.clearingInProgress_ = false;
if (this.$.dialog.open)
this.$.dialog.close();
this.fire('reset-done');
- }.bind(this));
+ });
},
/**
« no previous file with comments | « chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js ('k') | chrome/browser/resources/settings/route.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698