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

Unified Diff: chrome/browser/resources/settings/search_page/search_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/search_page/search_page.js
diff --git a/chrome/browser/resources/settings/search_page/search_page.js b/chrome/browser/resources/settings/search_page/search_page.js
index 54d2e8349782ca1349e281c8e34c30151e1f338b..06439bd1fcdf40fe3b8583d25519c731af6e3533 100644
--- a/chrome/browser/resources/settings/search_page/search_page.js
+++ b/chrome/browser/resources/settings/search_page/search_page.js
@@ -55,10 +55,10 @@ Polymer({
/** @override */
ready: function() {
// Omnibox search engine
- var updateSearchEngines = function(searchEngines) {
+ var updateSearchEngines = searchEngines => {
this.set('searchEngines_', searchEngines.defaults);
this.requestHotwordInfoUpdate_();
- }.bind(this);
+ };
this.browserProxy_.getSearchEnginesList().then(updateSearchEngines);
cr.addWebUIListener('search-engines-changed', updateSearchEngines);
@@ -70,9 +70,9 @@ Polymer({
cr.addWebUIListener(
'google-now-availability-changed',
this.googleNowAvailabilityUpdate_.bind(this));
- this.browserProxy_.getGoogleNowAvailability().then(function(available) {
+ this.browserProxy_.getGoogleNowAvailability().then(available => {
this.googleNowAvailabilityUpdate_(available);
- }.bind(this));
+ });
this.focusConfig_ = new Map();
if (settings.routes.SEARCH_ENGINES) {
@@ -111,9 +111,9 @@ Polymer({
/** @private */
requestHotwordInfoUpdate_: function() {
- this.browserProxy_.getHotwordInfo().then(function(hotwordInfo) {
+ this.browserProxy_.getHotwordInfo().then(hotwordInfo => {
this.hotwordInfoUpdate_(hotwordInfo);
- }.bind(this));
+ });
},
/**

Powered by Google App Engine
This is Rietveld 408576698