summaryrefslogtreecommitdiffstats
path: root/net/url_request
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-10 23:08:33 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-10 23:08:33 +0000
commit4d8a425272c3a2749c9a0d13cce43df3be8de789 (patch)
treecf903adb661feb8477e06ffe465101ef4eb6b91e /net/url_request
parentc07d895f10758a47d36ba70cbd9f032ad9e34477 (diff)
downloadchromium_src-4d8a425272c3a2749c9a0d13cce43df3be8de789.zip
chromium_src-4d8a425272c3a2749c9a0d13cce43df3be8de789.tar.gz
chromium_src-4d8a425272c3a2749c9a0d13cce43df3be8de789.tar.bz2
Extend the IOBuffer to the disk cache.
This is cleanup from bug 5325. Review URL: http://codereview.chromium.org/20134 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9528 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request')
-rw-r--r--net/url_request/url_request_view_cache_job.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/url_request/url_request_view_cache_job.cc b/net/url_request/url_request_view_cache_job.cc
index 5a4a23c..0cd4efd 100644
--- a/net/url_request/url_request_view_cache_job.cc
+++ b/net/url_request/url_request_view_cache_job.cc
@@ -87,9 +87,9 @@ static std::string FormatEntryDetails(disk_cache::Entry* entry) {
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>");
}