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

Unified Diff: chrome/browser/ui/task_manager/task_manager_table_model.cc

Issue 2734883003: base: Make TimeDurationFormat* report failures. (Closed)
Patch Set: log locale Created 3 years, 9 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 | « base/i18n/time_formatting_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/task_manager/task_manager_table_model.cc
diff --git a/chrome/browser/ui/task_manager/task_manager_table_model.cc b/chrome/browser/ui/task_manager/task_manager_table_model.cc
index 8123a35f5e43724522213cb284c583e6349e15a8..4441e932f3af6392eeb70e34536b1e7c03a5970c 100644
--- a/chrome/browser/ui/task_manager/task_manager_table_model.cc
+++ b/chrome/browser/ui/task_manager/task_manager_table_model.cc
@@ -141,8 +141,11 @@ class TaskManagerValuesStringifier {
if (cpu_time.is_zero())
return n_a_string_;
- return base::TimeDurationFormatWithSeconds(cpu_time,
- base::DURATION_WIDTH_NARROW);
+ base::string16 duration;
+ return base::TimeDurationFormatWithSeconds(
+ cpu_time, base::DURATION_WIDTH_NARROW, &duration)
+ ? duration
+ : n_a_string_;
}
base::string16 GetMemoryUsageText(int64_t memory_usage, bool has_duplicates) {
« no previous file with comments | « base/i18n/time_formatting_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698