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

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

Issue 147443007: Add support for localized time strings with two units, eg. "2 hours 17 minutes" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More cleanup and documentation Created 6 years, 10 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
Index: ash/system/chromeos/power/power_status_view.cc
diff --git a/ash/system/chromeos/power/power_status_view.cc b/ash/system/chromeos/power/power_status_view.cc
index d930f68156a2757a3fe5e96256efff224866436b..3e64fe5c4222ae090ba6b3a7e4cc3072912f9336 100644
--- a/ash/system/chromeos/power/power_status_view.cc
+++ b/ash/system/chromeos/power/power_status_view.cc
@@ -186,7 +186,8 @@ void PowerStatusView::UpdateTextForNotificationView() {
base::IntToString16(min)));
} else {
// This is a low battery warning prompting the user in minutes.
- time_label_->SetText(ui::TimeFormat::TimeRemainingLong(
+ time_label_->SetText(ui::TimeFormat::Simple(
+ ui::TimeFormat::kRemaining, ui::TimeFormat::kLong,
base::TimeDelta::FromMinutes(hour * 60 + min)));
}
} else {

Powered by Google App Engine
This is Rietveld 408576698