Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1404)

Unified Diff: ash/system/power/power_status_view.cc

Issue 14246015: Make PowerStatusView::GetRoundedBatteryPercentage() round. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d674f117c79ce127e6f2a7293b8330b3a9f091ac..933efee31101d5b187df849b774085ac5dd0a4af 100644
--- a/ash/system/power/power_status_view.cc
+++ b/ash/system/power/power_status_view.cc
@@ -240,7 +240,7 @@ void PowerStatusView::UpdateTextForNotificationView() {
int PowerStatusView::GetRoundedBatteryPercentage() const {
DCHECK(supply_status_.battery_percentage >= 0.0f);
return std::max(kMinBatteryPercent,
- static_cast<int>(supply_status_.battery_percentage));
+ static_cast<int>(supply_status_.battery_percentage + 0.5));
}
base::string16 PowerStatusView::GetBatteryTimeAccessibilityString(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698