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

Unified Diff: chrome/browser/resources/settings/route.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/route.js
diff --git a/chrome/browser/resources/settings/route.js b/chrome/browser/resources/settings/route.js
index a719b0c211c11e8490debf4db201145e67588461..d20604ccc41b55a7060a473e97b6dcf272c48ed1 100644
--- a/chrome/browser/resources/settings/route.js
+++ b/chrome/browser/resources/settings/route.js
@@ -429,9 +429,9 @@ cr.define('settings', function() {
this.currentRoute = route;
this.currentQueryParameters_ = queryParameters;
this.wasLastRouteChangePopstate_ = isPopstate;
- routeObservers.forEach(function(observer) {
+ routeObservers.forEach(observer => {
observer.currentRouteChanged(this.currentRoute, oldRoute);
- }.bind(this));
+ });
}
/** @return {!settings.Route} */
@@ -460,9 +460,9 @@ cr.define('settings', function() {
var canonicalPath = path.replace(CANONICAL_PATH_REGEX, '$1$2');
// TODO(tommycli): Use Object.values once Closure compilation supports it.
- var matchingKey = Object.keys(this.routes_).find(function(key) {
- return this.routes_[key].path == canonicalPath;
- }.bind(this));
+ var matchingKey =
+ Object.keys(this.routes_)
+ .find(key => this.routes_[key].path == canonicalPath);
return !!matchingKey ? this.routes_[matchingKey] : null;
}

Powered by Google App Engine
This is Rietveld 408576698