diff options
author | jennyz@chromium.org <jennyz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-08 18:22:18 +0000 |
---|---|---|
committer | jennyz@chromium.org <jennyz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-08 18:22:18 +0000 |
commit | 2a30d2dfe3a50a573f9cf6bd69184bc2844d6564 (patch) | |
tree | c45e5965ba68f2244e97804993989a3f9f5e3691 /ash | |
parent | 0e7a214f5d39b5f012f9d55ea2e095fbd566e403 (diff) | |
download | chromium_src-2a30d2dfe3a50a573f9cf6bd69184bc2844d6564.zip chromium_src-2a30d2dfe3a50a573f9cf6bd69184bc2844d6564.tar.gz chromium_src-2a30d2dfe3a50a573f9cf6bd69184bc2844d6564.tar.bz2 |
Fix the issue that battery icon image does not match the battery percentage, which may happen at the beginning of each session or after resuming from sleeping state.
BUG=158343
Review URL: https://codereview.chromium.org/11359094
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166703 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r-- | ash/system/power/tray_power.cc | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/ash/system/power/tray_power.cc b/ash/system/power/tray_power.cc index 2c04b95..27696e7 100644 --- a/ash/system/power/tray_power.cc +++ b/ash/system/power/tray_power.cc @@ -150,10 +150,6 @@ int TrayPower::GetBatteryImageIndex(const PowerSupplyStatus& supply_status) { } else if (!supply_status.battery_is_present) { image_index = kNumPowerImages; } else { - // If power supply is calculating battery time, the battery percentage - // is uncertain, just return -1. - if (supply_status.is_calculating_battery_time) - return -1; image_index = static_cast<int>(supply_status.battery_percentage / 100.0 * (kNumPowerImages - 1)); image_index = std::max(std::min(image_index, kNumPowerImages - 2), 0); |