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

Unified Diff: chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_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/clear_browsing_data_dialog/clear_browsing_data_dialog.js
diff --git a/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_dialog.js b/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_dialog.js
index cc194f286a9057c41692c643860c318e838d0766..66b6d65f6e19bfe0308db1926da147783b5e84e2 100644
--- a/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_dialog.js
+++ b/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_dialog.js
@@ -105,14 +105,14 @@ Polymer({
attached: function() {
this.browserProxy_ =
settings.ClearBrowsingDataBrowserProxyImpl.getInstance();
- this.browserProxy_.initialize().then(function() {
+ this.browserProxy_.initialize().then(() => {
this.$.clearBrowsingDataDialog.showModal();
- }.bind(this));
+ });
if (this.importantSitesFlagEnabled_) {
- this.browserProxy_.getImportantSites().then(function(sites) {
+ this.browserProxy_.getImportantSites().then(sites => {
this.importantSites_ = sites;
- }.bind(this));
+ });
}
},
@@ -197,18 +197,12 @@ Polymer({
this.clearingInProgress_ = true;
this.browserProxy_.clearBrowsingData(this.importantSites_)
- .then(
- /**
- * @param {boolean} shouldShowNotice Whether we should show the
- * notice about other forms of browsing history before closing the
- * dialog.
- */
- function(shouldShowNotice) {
- this.clearingInProgress_ = false;
- this.showHistoryDeletionDialog_ = shouldShowNotice;
- if (!shouldShowNotice)
- this.closeDialogs_();
- }.bind(this));
+ .then(shouldShowNotice => {
+ this.clearingInProgress_ = false;
+ this.showHistoryDeletionDialog_ = shouldShowNotice;
+ if (!shouldShowNotice)
+ this.closeDialogs_();
+ });
},
/**

Powered by Google App Engine
This is Rietveld 408576698