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

Unified Diff: chrome/browser/resources/settings/bluetooth_page/bluetooth_subpage.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/bluetooth_page/bluetooth_subpage.js
diff --git a/chrome/browser/resources/settings/bluetooth_page/bluetooth_subpage.js b/chrome/browser/resources/settings/bluetooth_page/bluetooth_subpage.js
index 731f9d523d4a3cc6481040797e7226a270f31b8b..93affb35ba0ef154466492da3dc54a3b25f04060 100644
--- a/chrome/browser/resources/settings/bluetooth_page/bluetooth_subpage.js
+++ b/chrome/browser/resources/settings/bluetooth_page/bluetooth_subpage.js
@@ -256,9 +256,9 @@ Polymer({
this.deviceList_ = [];
return;
}
- this.bluetooth.getDevices(function(devices) {
+ this.bluetooth.getDevices(devices => {
this.deviceList_ = devices;
- }.bind(this));
+ });
},
/**
@@ -385,7 +385,7 @@ Polymer({
this.openDialog_('pairDevice');
}
- this.bluetoothPrivate.connect(device.address, function(result) {
+ this.bluetoothPrivate.connect(device.address, result => {
var error;
if (chrome.runtime.lastError) {
error = chrome.runtime.lastError.message;
@@ -416,7 +416,7 @@ Polymer({
console.error('Unexpected error connecting to: ' + name + ': ' + error);
}
this.openDialog_('connectError');
- }.bind(this));
+ });
},
/**
@@ -438,14 +438,14 @@ Polymer({
* @private
*/
forgetDevice_: function(device) {
- this.bluetoothPrivate.forgetDevice(device.address, function() {
+ this.bluetoothPrivate.forgetDevice(device.address, () => {
if (chrome.runtime.lastError) {
console.error(
'Error forgetting: ' + device.name + ': ' +
chrome.runtime.lastError.message);
}
this.updateDeviceList_();
- }.bind(this));
+ });
},
/**

Powered by Google App Engine
This is Rietveld 408576698