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

Unified Diff: chrome/browser/resources/settings/on_startup_page/startup_urls_page.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/on_startup_page/startup_urls_page.js
diff --git a/chrome/browser/resources/settings/on_startup_page/startup_urls_page.js b/chrome/browser/resources/settings/on_startup_page/startup_urls_page.js
index 289ed08330fc4749f9974ada041b95c0487adfcb..588d084b8bc3a44964fcbc65d1a15ca4df992e70 100644
--- a/chrome/browser/resources/settings/on_startup_page/startup_urls_page.js
+++ b/chrome/browser/resources/settings/on_startup_page/startup_urls_page.js
@@ -63,36 +63,36 @@ Polymer({
/** @override */
attached: function() {
this.getNtpExtension_();
- this.addWebUIListener('update-ntp-extension', function(ntpExtension) {
+ this.addWebUIListener('update-ntp-extension', ntpExtension => {
// Note that |ntpExtension| is empty if there is no NTP extension.
this.ntpExtension_ = ntpExtension;
- }.bind(this));
+ });
this.browserProxy_ = settings.StartupUrlsPageBrowserProxyImpl.getInstance();
- this.addWebUIListener('update-startup-pages', function(startupPages) {
+ this.addWebUIListener('update-startup-pages', startupPages => {
// If an "edit" URL dialog was open, close it, because the underlying page
// might have just been removed (and model indices have changed anyway).
if (this.startupUrlDialogModel_)
this.destroyUrlDialog_();
this.startupPages_ = startupPages;
this.updateScrollableContents();
- }.bind(this));
+ });
this.browserProxy_.loadStartupPages();
- this.addEventListener(settings.EDIT_STARTUP_URL_EVENT, function(event) {
+ this.addEventListener(settings.EDIT_STARTUP_URL_EVENT, event => {
this.startupUrlDialogModel_ = event.detail.model;
this.startupUrlDialogAnchor_ = event.detail.anchor;
this.showStartupUrlDialog_ = true;
event.stopPropagation();
- }.bind(this));
+ });
},
/** @private */
getNtpExtension_: function() {
settings.OnStartupBrowserProxyImpl.getInstance().getNtpExtension().then(
- function(ntpExtension) {
+ ntpExtension => {
this.ntpExtension_ = ntpExtension;
- }.bind(this));
+ });
},
/**

Powered by Google App Engine
This is Rietveld 408576698