Commit c1ec388a authored by Michael Checo's avatar Michael Checo Committed by Commit Bot

Diagnostics: Convert callbacks using .bind to arrow functions

Bug: 1125150
Test: browser_tests --gtest_filter=DiagnosticsApp*
Change-Id: Ic93a11bc58041721e14781f31d8f4b9bc590f9b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2544854Reviewed-by: default avatarZentaro Kavanagh <zentaro@chromium.org>
Commit-Queue: Michael Checo <michaelcheco@google.com>
Cr-Commit-Position: refs/heads/master@{#829283}
parent 1db2ece1
...@@ -87,16 +87,17 @@ Polymer({ ...@@ -87,16 +87,17 @@ Polymer({
/** @private */ /** @private */
fetchBatteryInfo_() { fetchBatteryInfo_() {
this.systemDataProvider_.getBatteryInfo().then( this.systemDataProvider_.getBatteryInfo().then((result) => {
this.onBatteryInfoReceived_.bind(this)); this.onBatteryInfoReceived_(result.batteryInfo);
});
}, },
/** /**
* @param {!{batteryInfo: !BatteryInfo}} result * @param {!BatteryInfo} batteryInfo
* @private * @private
*/ */
onBatteryInfoReceived_(result) { onBatteryInfoReceived_(batteryInfo) {
this.batteryInfo_ = result.batteryInfo; this.batteryInfo_ = batteryInfo;
}, },
/** @private */ /** @private */
......
...@@ -50,17 +50,17 @@ Polymer({ ...@@ -50,17 +50,17 @@ Polymer({
/** @private */ /** @private */
fetchSystemInfo_() { fetchSystemInfo_() {
this.systemDataProvider_.getSystemInfo().then( this.systemDataProvider_.getSystemInfo().then((result) => {
this.onSystemInfoReceived_.bind(this)); this.onSystemInfoReceived_(result.systemInfo);
});
}, },
/** /**
* @param {{systemInfo: !SystemInfo}} result * @param {!SystemInfo} systemInfo
* @private * @private
*/ */
onSystemInfoReceived_(result) { onSystemInfoReceived_(systemInfo) {
this.showBatteryStatusCard_ = this.showBatteryStatusCard_ = systemInfo.deviceCapabilities.hasBattery;
result.systemInfo.deviceCapabilities.hasBattery;
}, },
}); });
\ No newline at end of file
...@@ -41,16 +41,16 @@ Polymer({ ...@@ -41,16 +41,16 @@ Polymer({
/** @private */ /** @private */
fetchSystemInfo_() { fetchSystemInfo_() {
this.systemDataProvider_.getSystemInfo().then( this.systemDataProvider_.getSystemInfo().then((result) => {
this.onSystemInfoReceived_.bind(this)); this.onSystemInfoReceived_(result.systemInfo);
});
}, },
/** /**
* @param {!{systemInfo: !SystemInfo}} result * @param {!SystemInfo} systemInfo
* @private * @private
*/ */
onSystemInfoReceived_(result) { onSystemInfoReceived_(systemInfo) {
this.systemInfo_ = result.systemInfo; this.systemInfo_ = systemInfo;
}, },
}); });
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment