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 ac744b49e1e1ac5222a38dc77e0864ff30ec5309..9c377f119793d524a4a047f0e09e17323226179e 100644 |
--- a/chrome/browser/ui/webui/cookies_tree_model_util.cc |
+++ b/chrome/browser/ui/webui/cookies_tree_model_util.cc |
@@ -41,6 +41,11 @@ static const char kKeyModified[] = "modified"; |
static const char kKeyPersistent[] = "persistent"; |
static const char kKeyTemporary[] = "temporary"; |
+static const char kKeyTotalUsage[] = "totalUsage"; |
+static const char kKeyTemporaryUsage[] = "temporaryUsage"; |
+static const char kKeyPersistentUsage[] = "persistentUsage"; |
+static const char kKeyPersistentQuota[] = "persistentQuota"; |
+ |
// Encodes a pointer value into a hex string. |
std::string PointerToHexString(const void* pointer) { |
return base::HexEncode(&pointer, sizeof(pointer)); |
@@ -190,6 +195,25 @@ void GetCookieTreeNodeDictionary(const CookieTreeNode& node, |
IDS_COOKIES_FILE_SYSTEM_USAGE_NONE)); |
break; |
} |
+ case CookieTreeNode::DetailedInfo::TYPE_QUOTA: { |
+ dict->SetString(kKeyType, "quota"); |
+ dict->SetString(kKeyIcon, "chrome://theme/IDR_COOKIE_STORAGE_ICON"); |
+ |
+ const BrowsingDataQuotaHelper::QuotaInfo& quota_info = |
+ *node.GetDetailedInfo().quota_info; |
+ dict->SetString(kKeyOrigin, quota_info.host); |
+ dict->SetString(kKeyTotalUsage, |
Mike Mammarella
2011/07/29 17:59:26
In the example screenshot you have some data that'
tzik
2011/08/01 02:46:26
Done.
|
+ UTF16ToUTF8(ui::FormatBytes( |
+ quota_info.temporary_usage + |
+ quota_info.persistent_usage))); |
+ dict->SetString(kKeyTemporaryUsage, |
+ UTF16ToUTF8(ui::FormatBytes( |
+ quota_info.temporary_usage))); |
+ dict->SetString(kKeyPersistentUsage, |
+ UTF16ToUTF8(ui::FormatBytes( |
+ quota_info.persistent_usage))); |
+ break; |
+ } |
default: |
#if defined(OS_MACOSX) |
dict->SetString(kKeyIcon, "chrome://theme/IDR_BOOKMARK_BAR_FOLDER"); |