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

Unified Diff: chrome/browser/resources/md_history/synced_device_manager.js

Issue 2597573002: MD History/Downloads: convert .bind(this) and function property values to use => (Closed)
Patch Set: Created 4 years 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/md_history/synced_device_manager.js
diff --git a/chrome/browser/resources/md_history/synced_device_manager.js b/chrome/browser/resources/md_history/synced_device_manager.js
index 6dd7f7881bc2bb6b6a4acfffe6ed9d24b49dd500..2782defb8a99a272e73b1fa53dc3e4f90b8b09f7 100644
--- a/chrome/browser/resources/md_history/synced_device_manager.js
+++ b/chrome/browser/resources/md_history/synced_device_manager.js
@@ -28,7 +28,7 @@ Polymer({
* An array of synced devices with synced tab data.
* @type {!Array<!ForeignDeviceInternal>}
*/
- syncedDevices_: {type: Array, value: function() { return []; }},
+ syncedDevices_: {type: Array, value: () => []},
/** @private */
signInState: {
@@ -167,12 +167,8 @@ Polymer({
this.debounce('updateFocusGrid', function() {
Polymer.dom(this.root)
.querySelectorAll('history-synced-device-card')
- .reduce(
- function(prev, cur) {
- return prev.concat(cur.createFocusRows());
- },
- [])
- .forEach(function(row) { this.focusGrid_.addRow(row); }.bind(this));
+ .reduce((prev, cur) => prev.concat(cur.createFocusRows()), [])
+ .forEach(row => this.focusGrid_.addRow(row));
this.focusGrid_.ensureRowActive();
});
},
@@ -257,11 +253,11 @@ Polymer({
}
var devices = [];
- sessionList.forEach(function(session) {
+ sessionList.forEach(session => {
var device = this.createInternalDevice_(session);
if (device.tabs.length != 0)
devices.push(device);
- }.bind(this));
+ });
this.syncedDevices_ = devices;
},

Powered by Google App Engine
This is Rietveld 408576698