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

Unified Diff: net/url_request/url_request_file_job.cc

Issue 1148383003: Only support seeking file streams from the beginning of the file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Win DBG build by Pass()-ing file out of CreateForAsyncHandle. Created 5 years, 6 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/base/upload_file_element_reader.cc ('k') | storage/browser/fileapi/local_file_stream_reader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_file_job.cc
diff --git a/net/url_request/url_request_file_job.cc b/net/url_request/url_request_file_job.cc
index 17bc642db4cc9138703146241b7e1fb8ade23c45..b035c0d701b92ad55faf8d4564633fc35ca836c4 100644
--- a/net/url_request/url_request_file_job.cc
+++ b/net/url_request/url_request_file_job.cc
@@ -266,8 +266,7 @@ void URLRequestFileJob::DidOpen(int result) {
DCHECK_GE(remaining_bytes_, 0);
if (remaining_bytes_ > 0 && byte_range_.first_byte_position() != 0) {
- int rv = stream_->Seek(base::File::FROM_BEGIN,
- byte_range_.first_byte_position(),
+ int rv = stream_->Seek(byte_range_.first_byte_position(),
base::Bind(&URLRequestFileJob::DidSeek,
weak_ptr_factory_.GetWeakPtr()));
if (rv != ERR_IO_PENDING) {
« no previous file with comments | « net/base/upload_file_element_reader.cc ('k') | storage/browser/fileapi/local_file_stream_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698