Index: chrome/browser/ui/webui/cookies_tree_model_util.cc |
diff --git a/chrome/browser/ui/webui/cookies_tree_model_util.cc b/chrome/browser/ui/webui/cookies_tree_model_util.cc |
index 438aa2bf1d270b48b5a5b233950080632482a759..88e894f68763baa65055d0a85b6cbb2a59cc4a3d 100644 |
--- a/chrome/browser/ui/webui/cookies_tree_model_util.cc |
+++ b/chrome/browser/ui/webui/cookies_tree_model_util.cc |
@@ -12,6 +12,7 @@ |
#include "chrome/browser/cookies_tree_model.h" |
#include "grit/generated_resources.h" |
#include "ui/base/l10n/l10n_util.h" |
+#include "ui/base/text/bytes_formatting.h" |
namespace { |
@@ -117,9 +118,9 @@ void GetCookieTreeNodeDictionary(const CookieTreeNode& node, |
database_info.database_name); |
dict->SetString(kKeyDesc, database_info.description); |
dict->SetString(kKeySize, |
- FormatBytes(database_info.size, |
- GetByteDisplayUnits(database_info.size), |
- true)); |
+ ui::FormatBytes(database_info.size, |
+ ui::DATA_UNITS_NATURAL, |
+ true)); |
dict->SetString(kKeyModified, UTF16ToUTF8( |
base::TimeFormatFriendlyDateAndTime(database_info.last_modified))); |
@@ -134,9 +135,9 @@ void GetCookieTreeNodeDictionary(const CookieTreeNode& node, |
dict->SetString(kKeyOrigin, local_storage_info.origin); |
dict->SetString(kKeySize, |
- FormatBytes(local_storage_info.size, |
- GetByteDisplayUnits(local_storage_info.size), |
- true)); |
+ ui::FormatBytes(local_storage_info.size, |
+ ui::DATA_UNITS_NATURAL, |
+ true)); |
dict->SetString(kKeyModified, UTF16ToUTF8( |
base::TimeFormatFriendlyDateAndTime( |
local_storage_info.last_modified))); |
@@ -152,9 +153,9 @@ void GetCookieTreeNodeDictionary(const CookieTreeNode& node, |
dict->SetString(kKeyManifest, appcache_info.manifest_url.spec()); |
dict->SetString(kKeySize, |
- FormatBytes(appcache_info.size, |
- GetByteDisplayUnits(appcache_info.size), |
- true)); |
+ ui::FormatBytes(appcache_info.size, |
+ ui::DATA_UNITS_NATURAL, |
+ true)); |
dict->SetString(kKeyCreated, UTF16ToUTF8( |
base::TimeFormatFriendlyDateAndTime(appcache_info.creation_time))); |
dict->SetString(kKeyAccessed, UTF16ToUTF8( |
@@ -171,9 +172,9 @@ void GetCookieTreeNodeDictionary(const CookieTreeNode& node, |
dict->SetString(kKeyOrigin, indexed_db_info.origin); |
dict->SetString(kKeySize, |
- FormatBytes(indexed_db_info.size, |
- GetByteDisplayUnits(indexed_db_info.size), |
- true)); |
+ ui::FormatBytes(indexed_db_info.size, |
+ ui::DATA_UNITS_NATURAL, |
+ true)); |
dict->SetString(kKeyModified, UTF16ToUTF8( |
base::TimeFormatFriendlyDateAndTime(indexed_db_info.last_modified))); |
@@ -189,19 +190,17 @@ void GetCookieTreeNodeDictionary(const CookieTreeNode& node, |
dict->SetString(kKeyOrigin, file_system_info.origin.spec()); |
dict->SetString(kKeyPersistent, |
file_system_info.has_persistent ? |
- UTF16ToUTF8(FormatBytes( |
+ UTF16ToUTF8(ui::FormatBytes( |
file_system_info.usage_persistent, |
- GetByteDisplayUnits( |
- file_system_info.usage_persistent), |
+ ui::DATA_UNITS_NATURAL, |
true)) : |
l10n_util::GetStringUTF8( |
IDS_COOKIES_FILE_SYSTEM_USAGE_NONE)); |
dict->SetString(kKeyTemporary, |
file_system_info.has_temporary ? |
- UTF16ToUTF8(FormatBytes( |
+ UTF16ToUTF8(ui::FormatBytes( |
file_system_info.usage_temporary, |
- GetByteDisplayUnits( |
- file_system_info.usage_temporary), |
+ ui::DATA_UNITS_NATURAL, |
true)) : |
l10n_util::GetStringUTF8( |
IDS_COOKIES_FILE_SYSTEM_USAGE_NONE)); |