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

Unified Diff: net/url_request/url_request_view_cache_job.cc

Issue 20251: Extend the IOBuffer to the disk cache.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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/tools/dump_cache/upgrade.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/url_request_view_cache_job.cc
===================================================================
--- net/url_request/url_request_view_cache_job.cc (revision 9532)
+++ net/url_request/url_request_view_cache_job.cc (working copy)
@@ -87,9 +87,9 @@
int data_size = entry->GetDataSize(i);
- char* data = new char[data_size];
- if (entry->ReadData(i, 0, data, data_size, NULL) == data_size)
- HexDump(data, data_size, &result);
+ scoped_refptr<net::IOBuffer> buffer = new net::IOBuffer(data_size);
+ if (entry->ReadData(i, 0, buffer, data_size, NULL) == data_size)
+ HexDump(buffer->data(), data_size, &result);
result.append("</pre>");
}
« no previous file with comments | « net/tools/dump_cache/upgrade.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698