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

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: Address Tony's comments 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..dbcf1e1ce77a0bfbe68ec413a002907327fb634f 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::FORMAT_REMAINING, ui::TimeFormat::LENGTH_LONG,
base::TimeDelta::FromMinutes(hour * 60 + min)));
}
} else {
« no previous file with comments | « ash/system/chromeos/power/power_status.cc ('k') | ash/system/logout_button/logout_confirmation_dialog_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698