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

Unified Diff: chrome/browser/ui/webui/policy_ui.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
« no previous file with comments | « chrome/browser/ui/webui/ntp/foreign_session_handler.cc ('k') | chrome/common/time_format_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/policy_ui.cc
diff --git a/chrome/browser/ui/webui/policy_ui.cc b/chrome/browser/ui/webui/policy_ui.cc
index 607a22868b12b29bffbc525fefc6dc72968d9813..c2a098b975558e9e8a7be08a4d716ce54a6d0f1f 100644
--- a/chrome/browser/ui/webui/policy_ui.cc
+++ b/chrome/browser/ui/webui/policy_ui.cc
@@ -188,11 +188,15 @@ void GetStatusFromCore(const policy::CloudPolicyCore* core,
dict->SetString("clientId", client_id);
dict->SetString("username", username);
dict->SetString("refreshInterval",
- ui::TimeFormat::TimeDurationShort(refresh_interval));
+ ui::TimeFormat::Simple(ui::TimeFormat::FORMAT_DURATION,
+ ui::TimeFormat::LENGTH_SHORT,
+ refresh_interval));
dict->SetString("timeSinceLastRefresh", last_refresh_time.is_null() ?
l10n_util::GetStringUTF16(IDS_POLICY_NEVER_FETCHED) :
- ui::TimeFormat::TimeElapsed(base::Time::NowFromSystemTime() -
- last_refresh_time));
+ ui::TimeFormat::Simple(ui::TimeFormat::FORMAT_ELAPSED,
+ ui::TimeFormat::LENGTH_SHORT,
+ base::Time::NowFromSystemTime() -
+ last_refresh_time));
}
void ExtractDomainFromUsername(base::DictionaryValue* dict) {
« no previous file with comments | « chrome/browser/ui/webui/ntp/foreign_session_handler.cc ('k') | chrome/common/time_format_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698