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

Unified Diff: net/url_request/view_cache_helper.cc

Issue 1594036: Update about:cache to display cached metadata for an entry.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 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 | « net/http/http_cache_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/view_cache_helper.cc
===================================================================
--- net/url_request/view_cache_helper.cc (revision 44299)
+++ net/url_request/view_cache_helper.cc (working copy)
@@ -66,7 +66,8 @@
return row;
}
-static std::string FormatEntryDetails(disk_cache::Entry* entry) {
+static std::string FormatEntryDetails(disk_cache::Entry* entry,
+ int num_entry_data_indices) {
std::string result = EscapeForHTML(entry->GetKey());
net::HttpResponseInfo response;
@@ -91,7 +92,7 @@
result.append("</pre>");
}
- for (int i = 0; i < 2; ++i) {
+ for (int i = 0; i < num_entry_data_indices; ++i) {
result.append("<hr><pre>");
int data_size = entry->GetDataSize(i);
@@ -160,7 +161,8 @@
} else {
disk_cache::Entry* entry;
if (disk_cache->OpenEntry(key, &entry)) {
- data->assign(FormatEntryDetails(entry));
+ data->assign(FormatEntryDetails(
+ entry, net::HttpCache::kNumCacheEntryDataIndices));
entry->Close();
} else {
data->assign("no matching cache entry for: " + EscapeForHTML(key));
« no previous file with comments | « net/http/http_cache_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698