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

Unified Diff: content/browser/fileapi/file_writer_delegate_unittest.cc

Issue 1459333002: Revert "Reland: URLRequestJob: change ReadRawData contract" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
Index: content/browser/fileapi/file_writer_delegate_unittest.cc
diff --git a/content/browser/fileapi/file_writer_delegate_unittest.cc b/content/browser/fileapi/file_writer_delegate_unittest.cc
index 9eb73b14204f89ead0884fa83ac01627e7736cb4..c9bcfbb7177a2a530c28db3c42e5163a94ba93b4 100644
--- a/content/browser/fileapi/file_writer_delegate_unittest.cc
+++ b/content/browser/fileapi/file_writer_delegate_unittest.cc
@@ -184,15 +184,17 @@ class FileWriterDelegateTestJob : public net::URLRequestJob {
base::Bind(&FileWriterDelegateTestJob::NotifyHeadersComplete, this));
}
- int ReadRawData(net::IOBuffer* buf, int buf_size) override {
+ bool ReadRawData(net::IOBuffer* buf, int buf_size, int* bytes_read) override {
if (remaining_bytes_ < buf_size)
- buf_size = remaining_bytes_;
+ buf_size = static_cast<int>(remaining_bytes_);
for (int i = 0; i < buf_size; ++i)
buf->data()[i] = content_[cursor_++];
remaining_bytes_ -= buf_size;
- return buf_size;
+ SetStatus(net::URLRequestStatus());
+ *bytes_read = buf_size;
+ return true;
}
int GetResponseCode() const override { return 200; }
« no previous file with comments | « content/browser/appcache/appcache_url_request_job.cc ('k') | content/browser/net/view_http_cache_job_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698