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

Unified Diff: content/public/browser/download_url_parameters.h

Issue 2660783002: Range request support for parallel download in DownloadRequestCore. (Closed)
Patch Set: Strong validator for all range request. Created 3 years, 11 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
Index: content/public/browser/download_url_parameters.h
diff --git a/content/public/browser/download_url_parameters.h b/content/public/browser/download_url_parameters.h
index 41b0ed637bdbb3dca8662e6c0309594f734e94f7..2f91d08b5a0c55b2684bb2ac096e89fc45f00eda 100644
--- a/content/public/browser/download_url_parameters.h
+++ b/content/public/browser/download_url_parameters.h
@@ -168,9 +168,11 @@ class CONTENT_EXPORT DownloadUrlParameters {
}
// If |offset| is non-zero, then a byte range request will be issued to fetch
- // the range of bytes starting at |offset| through to the end of thedownload.
+ // the range of bytes starting at |offset| through to the end of the download.
void set_offset(int64_t offset) { save_info_.offset = offset; }
+ void set_length(int64_t length) { save_info_.length = length; }
David Trainor- moved to gerrit 2017/02/01 07:14:36 Add a comment here along the lines of the one in D
xingliu 2017/02/01 20:25:46 Done. Also added some comment for set_offset.
+
// If |offset| is non-zero, then |hash_of_partial_file| contains the raw
// SHA-256 hash of the first |offset| bytes of the target file. Only
// meaningful if a partial file exists and is identified by either the
@@ -239,6 +241,7 @@ class CONTENT_EXPORT DownloadUrlParameters {
return save_info_.suggested_name;
}
int64_t offset() const { return save_info_.offset; }
+ int64_t length() const { return save_info_.length; }
const std::string& hash_of_partial_file() const {
return save_info_.hash_of_partial_file;
}

Powered by Google App Engine
This is Rietveld 408576698