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

Unified Diff: net/url_request/url_request_file_dir_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_file_dir_job.h ('k') | net/url_request/url_request_file_job.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_file_dir_job.cc
===================================================================
--- net/url_request/url_request_file_dir_job.cc (revision 8565)
+++ net/url_request/url_request_file_dir_job.cc (working copy)
@@ -26,7 +26,6 @@
list_complete_(false),
wrote_header_(false),
read_pending_(false),
- read_buffer_(NULL),
read_buffer_length_(0) {
}
@@ -68,7 +67,7 @@
lister_->Cancel();
}
-bool URLRequestFileDirJob::ReadRawData(char* buf, int buf_size,
+bool URLRequestFileDirJob::ReadRawData(net::IOBuffer* buf, int buf_size,
int *bytes_read) {
DCHECK(bytes_read);
*bytes_read = 0;
@@ -76,7 +75,7 @@
if (is_done())
return true;
- if (FillReadBuffer(buf, buf_size, bytes_read))
+ if (FillReadBuffer(buf->data(), buf_size, bytes_read))
return true;
// We are waiting for more data
@@ -183,7 +182,8 @@
void URLRequestFileDirJob::CompleteRead() {
if (read_pending_) {
int bytes_read;
- if (FillReadBuffer(read_buffer_, read_buffer_length_, &bytes_read)) {
+ if (FillReadBuffer(read_buffer_->data(), read_buffer_length_,
+ &bytes_read)) {
// We completed the read, so reset the read buffer.
read_pending_ = false;
read_buffer_ = NULL;
« no previous file with comments | « net/url_request/url_request_file_dir_job.h ('k') | net/url_request/url_request_file_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698