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

Unified Diff: net/url_request/url_request_test_job.cc

Issue 18390: Change URLRequest to use a ref-counted buffer for actual IO.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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/url_request/url_request_test_job.h ('k') | net/url_request/url_request_unittest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_test_job.cc
===================================================================
--- net/url_request/url_request_test_job.cc (revision 8565)
+++ net/url_request/url_request_test_job.cc (working copy)
@@ -93,7 +93,8 @@
this->NotifyHeadersComplete();
}
-bool URLRequestTestJob::ReadRawData(char* buf, int buf_size, int *bytes_read) {
+bool URLRequestTestJob::ReadRawData(net::IOBuffer* buf, int buf_size,
+ int *bytes_read) {
if (stage_ == WAITING) {
async_buf_ = buf;
async_buf_size_ = buf_size;
@@ -112,7 +113,7 @@
if (to_read + offset_ > static_cast<int>(data_.length()))
to_read = static_cast<int>(data_.length()) - offset_;
- memcpy(buf, &data_.c_str()[offset_], to_read);
+ memcpy(buf->data(), &data_.c_str()[offset_], to_read);
offset_ += to_read;
*bytes_read = to_read;
« no previous file with comments | « net/url_request/url_request_test_job.h ('k') | net/url_request/url_request_unittest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698