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

Unified Diff: chrome/browser/chromeos/fileapi/external_file_url_request_job.h

Issue 1439953006: Reland: URLRequestJob: change ReadRawData contract (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address David's comment 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: chrome/browser/chromeos/fileapi/external_file_url_request_job.h
diff --git a/chrome/browser/chromeos/fileapi/external_file_url_request_job.h b/chrome/browser/chromeos/fileapi/external_file_url_request_job.h
index a026e439b5e39b644ee45293cba0973447fbf710..dff3379ba3ffc324346ccdb54e80afd0c9eacd58 100644
--- a/chrome/browser/chromeos/fileapi/external_file_url_request_job.h
+++ b/chrome/browser/chromeos/fileapi/external_file_url_request_job.h
@@ -63,12 +63,17 @@ class ExternalFileURLRequestJob : public net::URLRequestJob {
void Kill() override;
bool GetMimeType(std::string* mime_type) const override;
bool IsRedirectResponse(GURL* location, int* http_status_code) override;
- bool ReadRawData(net::IOBuffer* buf, int buf_size, int* bytes_read) override;
+ int ReadRawData(net::IOBuffer* buf, int buf_size) override;
protected:
~ExternalFileURLRequestJob() override;
private:
+ // Helper method to start the job. Should be called asynchronously because
+ // NotifyStartError() is not legal to call synchronously in
+ // URLRequestJob::Start().
+ void StartAsync();
+
// Called from an internal helper class defined in drive_url_request_job.cc,
// which is running on the UI thread.
void OnHelperResultObtained(
@@ -91,6 +96,7 @@ class ExternalFileURLRequestJob : public net::URLRequestJob {
void* const profile_id_;
// The range of the file to be returned.
+ net::Error range_parse_result_;
net::HttpByteRange byte_range_;
int64 remaining_bytes_;

Powered by Google App Engine
This is Rietveld 408576698