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

Unified Diff: chrome/browser/resources/settings/site_settings/add_site_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/site_settings/add_site_dialog.js
diff --git a/chrome/browser/resources/settings/site_settings/add_site_dialog.js b/chrome/browser/resources/settings/site_settings/add_site_dialog.js
index c61483a265f72d542e9ec7ab94d7fe59b46931f1..1750483931e170734e668d7cad097b03e6fe0589 100644
--- a/chrome/browser/resources/settings/site_settings/add_site_dialog.js
+++ b/chrome/browser/resources/settings/site_settings/add_site_dialog.js
@@ -43,12 +43,12 @@ Polymer({
/** Open the dialog. */
open: function() {
- this.addWebUIListener('onIncognitoStatusChanged', function(hasIncognito) {
+ this.addWebUIListener('onIncognitoStatusChanged', hasIncognito => {
this.$.incognito.checked = false;
this.showIncognitoSessionOnly_ = hasIncognito &&
!loadTimeData.getBoolean('isGuest') &&
this.contentSetting != settings.ContentSetting.SESSION_ONLY;
- }.bind(this));
+ });
this.browserProxy.updateIncognitoStatus();
this.$.dialog.showModal();
},
@@ -66,10 +66,10 @@ Polymer({
return;
}
- this.browserProxy.isPatternValid(this.site_).then(function(isValid) {
+ this.browserProxy.isPatternValid(this.site_).then(isValid => {
this.$.site.invalid = !isValid;
this.$.add.disabled = !isValid;
- }.bind(this));
+ });
},
/** @private */

Powered by Google App Engine
This is Rietveld 408576698