Chromium Code Reviews| Index: ash/system/power/power_status_view.cc |
| diff --git a/ash/system/power/power_status_view.cc b/ash/system/power/power_status_view.cc |
| index cd47f71696e0b6c7ce17ad4fbecfb2e2e74d55f9..05f318b219ef53770062f5d0fc6e9af2bd643e5c 100644 |
| --- a/ash/system/power/power_status_view.cc |
| +++ b/ash/system/power/power_status_view.cc |
| @@ -87,8 +87,14 @@ void PowerStatusView::UpdateTextForDefaultView() { |
| int hour = 0; |
| int min = 0; |
| if (!supply_status_.is_calculating_battery_time) { |
| + // TODO(jennyz): Due to crosbug.com/31633, averaged_battery_time_to_empty |
| + // from PowerSupplyStatus object can contain garbage data for the first |
| + // call in a crOS session. Until this bug is fixed, use |
| + // supply_status_.battery_seconds_to_empty to render battery time. |
| + // Change back to use averaged_battery_time_to_empty to display in UI |
| + // once crosbug.com/31633 is fixed. |
| base::TimeDelta time = base::TimeDelta::FromSeconds( |
| - supply_status_.averaged_battery_time_to_empty); |
| + supply_status_.battery_seconds_to_empty); |
|
sadrul
2012/06/11 21:43:15
Interesting. Just the seconds_to_empty is garbage,
|
| hour = time.InHours(); |
| min = (time - base::TimeDelta::FromHours(hour)).InMinutes(); |
| } |