summaryrefslogtreecommitdiffstats
path: root/chrome/browser/task_manager/task_manager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/task_manager/task_manager.cc')
-rw-r--r--chrome/browser/task_manager/task_manager.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/chrome/browser/task_manager/task_manager.cc b/chrome/browser/task_manager/task_manager.cc
index 35c8e96..f568f01 100644
--- a/chrome/browser/task_manager/task_manager.cc
+++ b/chrome/browser/task_manager/task_manager.cc
@@ -36,6 +36,7 @@
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
+#include "ui/base/text/bytes_formatting.h"
#include "unicode/coll.h"
#if defined(OS_MACOSX)
@@ -63,8 +64,8 @@ int ValueCompare(T value1, T value2) {
string16 FormatStatsSize(const WebKit::WebCache::ResourceTypeStat& stat) {
return l10n_util::GetStringFUTF16(IDS_TASK_MANAGER_CACHE_SIZE_CELL_TEXT,
- FormatBytes(stat.size, DATA_UNITS_KIBIBYTE, false),
- FormatBytes(stat.liveSize, DATA_UNITS_KIBIBYTE, false));
+ ui::FormatBytesWithUnits(stat.size, ui::DATA_UNITS_KIBIBYTE, false),
+ ui::FormatBytesWithUnits(stat.liveSize, ui::DATA_UNITS_KIBIBYTE, false));
}
} // namespace
@@ -128,8 +129,7 @@ string16 TaskManagerModel::GetResourceNetworkUsage(int index) const {
return l10n_util::GetStringUTF16(IDS_TASK_MANAGER_NA_CELL_TEXT);
if (net_usage == 0)
return ASCIIToUTF16("0");
- string16 net_byte = FormatSpeed(net_usage, GetByteDisplayUnits(net_usage),
- true);
+ string16 net_byte = ui::FormatSpeed(net_usage);
// Force number string to have LTR directionality.
return base::i18n::GetDisplayStringInLTRDirectionality(net_byte);
}
@@ -237,12 +237,12 @@ string16 TaskManagerModel::GetResourceV8MemoryAllocatedSize(
if (!resources_[index]->ReportsV8MemoryStats())
return l10n_util::GetStringUTF16(IDS_TASK_MANAGER_NA_CELL_TEXT);
return l10n_util::GetStringFUTF16(IDS_TASK_MANAGER_CACHE_SIZE_CELL_TEXT,
- FormatBytes(resources_[index]->GetV8MemoryAllocated(),
- DATA_UNITS_KIBIBYTE,
- false),
- FormatBytes(resources_[index]->GetV8MemoryUsed(),
- DATA_UNITS_KIBIBYTE,
- false));
+ ui::FormatBytesWithUnits(resources_[index]->GetV8MemoryAllocated(),
+ ui::DATA_UNITS_KIBIBYTE,
+ false),
+ ui::FormatBytesWithUnits(resources_[index]->GetV8MemoryUsed(),
+ ui::DATA_UNITS_KIBIBYTE,
+ false));
}
bool TaskManagerModel::IsResourceFirstInGroup(int index) const {
@@ -489,9 +489,9 @@ string16 TaskManagerModel::GetMemCellText(int64 number) const {
base::i18n::AdjustStringForLocaleDirection(&str);
return l10n_util::GetStringFUTF16(IDS_TASK_MANAGER_MEM_CELL_TEXT, str);
#else
- // System expectation is to show "100 KB", "200 MB", etc.
+ // System expectation is to show "100 kB", "200 MB", etc.
// TODO(thakis): Switch to metric units (as opposed to powers of two).
- return FormatBytes(number, GetByteDisplayUnits(number), /*show_units=*/true);
+ return ui::FormatBytes(number);
#endif
}