diff options
Diffstat (limited to 'content/browser/fileapi/file_writer_delegate_unittest.cc')
-rw-r--r-- | content/browser/fileapi/file_writer_delegate_unittest.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/content/browser/fileapi/file_writer_delegate_unittest.cc b/content/browser/fileapi/file_writer_delegate_unittest.cc index c9bcfbb..9eb73b1 100644 --- a/content/browser/fileapi/file_writer_delegate_unittest.cc +++ b/content/browser/fileapi/file_writer_delegate_unittest.cc @@ -184,17 +184,15 @@ class FileWriterDelegateTestJob : public net::URLRequestJob { base::Bind(&FileWriterDelegateTestJob::NotifyHeadersComplete, this)); } - bool ReadRawData(net::IOBuffer* buf, int buf_size, int* bytes_read) override { + int ReadRawData(net::IOBuffer* buf, int buf_size) override { if (remaining_bytes_ < buf_size) - buf_size = static_cast<int>(remaining_bytes_); + buf_size = remaining_bytes_; for (int i = 0; i < buf_size; ++i) buf->data()[i] = content_[cursor_++]; remaining_bytes_ -= buf_size; - SetStatus(net::URLRequestStatus()); - *bytes_read = buf_size; - return true; + return buf_size; } int GetResponseCode() const override { return 200; } |