summaryrefslogtreecommitdiffstats
path: root/net/url_request
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-12 00:03:19 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-12 00:03:19 +0000
commit74a85ce422d6b52a79b3cf159203ec7fa35c15ee (patch)
treee35947baf74dd4325b926bf44a3364ed3cfe4038 /net/url_request
parent39008c0d7c9f627b6eeef41bd7ddb78b7ebe086d (diff)
downloadchromium_src-74a85ce422d6b52a79b3cf159203ec7fa35c15ee.zip
chromium_src-74a85ce422d6b52a79b3cf159203ec7fa35c15ee.tar.gz
chromium_src-74a85ce422d6b52a79b3cf159203ec7fa35c15ee.tar.bz2
Extend the IOBuffer to the disk cache.
This is cleanup from bug 5325. Original code review: http://codereview.chromium.org/20134/show Review URL: http://codereview.chromium.org/20251 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9626 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>");
}