| 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..88121d8c0363f231e8f7b67d2d4726e02076d965 100644
|
| --- a/content/public/browser/download_url_parameters.h
|
| +++ b/content/public/browser/download_url_parameters.h
|
| @@ -168,9 +168,16 @@ 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|.
|
| + // Use |set_length| to specify the last byte position, or the range
|
| + // request will be "Range:bytes={offset}-" to retrieve the rest of the file.
|
| void set_offset(int64_t offset) { save_info_.offset = offset; }
|
|
|
| + // When |length| > 0, the range of bytes will be from
|
| + // |save_info_.offset| to |save_info_.offset| + |length| - 1.
|
| + // See |DownloadSaveInfo.length|.
|
| + void set_length(int64_t length) { save_info_.length = length; }
|
| +
|
| // 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 +246,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;
|
| }
|
|
|