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({
/** @private */
fetchBatteryInfo_() {
this.systemDataProvider_.getBatteryInfo().then(
this.onBatteryInfoReceived_.bind(this));
this.systemDataProvider_.getBatteryInfo().then((result) => {
this.onBatteryInfoReceived_(result.batteryInfo);
});
},
/**
* @param {!{batteryInfo: !BatteryInfo}} result
* @param {!BatteryInfo} batteryInfo
* @private
*/
onBatteryInfoReceived_(result) {
this.batteryInfo_ = result.batteryInfo;
onBatteryInfoReceived_(batteryInfo) {
this.batteryInfo_ = batteryInfo;
},
/** @private */
......
......@@ -50,17 +50,17 @@ Polymer({
/** @private */
fetchSystemInfo_() {
this.systemDataProvider_.getSystemInfo().then(
this.onSystemInfoReceived_.bind(this));
this.systemDataProvider_.getSystemInfo().then((result) => {
this.onSystemInfoReceived_(result.systemInfo);
});
},
/**
* @param {{systemInfo: !SystemInfo}} result
* @param {!SystemInfo} systemInfo
* @private
*/
onSystemInfoReceived_(result) {
this.showBatteryStatusCard_ =
result.systemInfo.deviceCapabilities.hasBattery;
onSystemInfoReceived_(systemInfo) {
this.showBatteryStatusCard_ = systemInfo.deviceCapabilities.hasBattery;
},
});
\ No newline at end of file
......@@ -41,16 +41,16 @@ Polymer({
/** @private */
fetchSystemInfo_() {
this.systemDataProvider_.getSystemInfo().then(
this.onSystemInfoReceived_.bind(this));
this.systemDataProvider_.getSystemInfo().then((result) => {
this.onSystemInfoReceived_(result.systemInfo);
});
},
/**
* @param {!{systemInfo: !SystemInfo}} result
* @param {!SystemInfo} systemInfo
* @private
*/
onSystemInfoReceived_(result) {
this.systemInfo_ = result.systemInfo;
onSystemInfoReceived_(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