summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjennyz@chromium.org <jennyz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-09 21:46:27 +0000
committerjennyz@chromium.org <jennyz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-09 21:46:27 +0000
commit67e889c50e3eeaffdddae37d68dc7855a7b85958 (patch)
tree12a2250a4be715e89321ad5b6e7e70234e691b82
parent09fb639ce695b602cdb1b4374ee0e0ecae76264d (diff)
downloadchromium_src-67e889c50e3eeaffdddae37d68dc7855a7b85958.zip
chromium_src-67e889c50e3eeaffdddae37d68dc7855a7b85958.tar.gz
chromium_src-67e889c50e3eeaffdddae37d68dc7855a7b85958.tar.bz2
Merge 166703 - 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 TBR=jennyz@chromium.org Review URL: https://codereview.chromium.org/11312173 git-svn-id: svn://svn.chromium.org/chrome/branches/1271/src@166981 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ash/system/power/tray_power.cc4
1 files changed, 0 insertions, 4 deletions
diff --git a/ash/system/power/tray_power.cc b/ash/system/power/tray_power.cc
index 816d22a..ed9b9cf 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);