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

Unified Diff: net/tools/dump_cache/upgrade.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/http/http_transaction_unittest.h ('k') | net/url_request/url_request_view_cache_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/dump_cache/upgrade.cc
===================================================================
--- net/tools/dump_cache/upgrade.cc (revision 9532)
+++ net/tools/dump_cache/upgrade.cc (working copy)
@@ -5,6 +5,7 @@
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/string_util.h"
+#include "net/base/io_buffer.h"
#include "net/disk_cache/backend_impl.h"
#include "net/disk_cache/entry_impl.h"
@@ -444,8 +445,10 @@
return SendReadData();
}
- if (read_size != entry_->WriteData(stream_, offset_, input_->buffer,
- read_size, NULL, false))
+ scoped_refptr<net::WrappedIOBuffer> buf =
+ new net::WrappedIOBuffer(input_->buffer);
+ if (read_size != entry_->WriteData(stream_, offset_, buf, read_size, NULL,
+ false))
return Fail();
offset_ += read_size;
@@ -713,8 +716,9 @@
stream < 0 || stream > 1 || size > kBufferSize) {
msg.result = RESULT_INVALID_PARAMETER;
} else {
- int ret = entry_->ReadData(stream, input_->msg.arg3, output_->buffer, size,
- NULL);
+ scoped_refptr<net::WrappedIOBuffer> buf =
+ new net::WrappedIOBuffer(output_->buffer);
+ int ret = entry_->ReadData(stream, input_->msg.arg3, buf, size, NULL);
msg.buffer_bytes = (ret < 0) ? 0 : ret;
msg.result = RESULT_OK;
« no previous file with comments | « net/http/http_transaction_unittest.h ('k') | net/url_request/url_request_view_cache_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698