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

Unified Diff: chrome/browser/ui/webui/cookies_tree_model_util.cc

Issue 1297093002: Cache Storage API: Hook up to chrome://settings/cookies (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase onto https://codereview.chromium.org/1297023004 Created 5 years, 4 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
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 3a15aca604de235932bd483ce061668b9b130357..a12ecfbe0669e9436f0e57cc5f6f9dd9bc50aa38 100644
--- a/chrome/browser/ui/webui/cookies_tree_model_util.cc
+++ b/chrome/browser/ui/webui/cookies_tree_model_util.cc
@@ -15,6 +15,7 @@
#include "base/values.h"
#include "chrome/browser/browsing_data/cookies_tree_model.h"
#include "chrome/grit/generated_resources.h"
+#include "content/public/browser/cache_storage_context.h"
#include "content/public/browser/indexed_db_context.h"
#include "content/public/browser/service_worker_context.h"
#include "net/cookies/canonical_cookie.h"
@@ -185,7 +186,6 @@ bool CookiesTreeModelUtil::GetCookieTreeNodeDictionary(
dict->SetString(kKeySize, ui::FormatBytes(indexed_db_info.size_));
dict->SetString(kKeyModified, base::UTF16ToUTF8(
base::TimeFormatFriendlyDateAndTime(indexed_db_info.last_modified_)));
-
break;
}
case CookieTreeNode::DetailedInfo::TYPE_FILE_SYSTEM: {
@@ -270,6 +270,21 @@ bool CookiesTreeModelUtil::GetCookieTreeNodeDictionary(
dict->Set(kKeyScopes, scopes);
break;
}
+ case CookieTreeNode::DetailedInfo::TYPE_CACHE_STORAGE: {
+ dict->SetString(kKeyType, "cache_storage");
+ dict->SetString(kKeyIcon, "chrome://theme/IDR_COOKIE_STORAGE_ICON");
+
+ const content::CacheStorageUsageInfo& cache_storage_info =
+ *node.GetDetailedInfo().cache_storage_info;
+
+ dict->SetString(kKeyOrigin, cache_storage_info.origin.spec());
+ dict->SetString(kKeySize,
+ ui::FormatBytes(cache_storage_info.total_size_bytes));
+ dict->SetString(kKeyModified,
+ base::UTF16ToUTF8(base::TimeFormatFriendlyDateAndTime(
+ cache_storage_info.last_modified)));
+ break;
+ }
case CookieTreeNode::DetailedInfo::TYPE_FLASH_LSO: {
dict->SetString(kKeyType, "flash_lso");
dict->SetString(kKeyIcon, "chrome://theme/IDR_COOKIE_ICON");

Powered by Google App Engine
This is Rietveld 408576698