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; |