Chromium Code Reviews| Index: content/public/browser/download_save_info.h |
| diff --git a/content/public/browser/download_save_info.h b/content/public/browser/download_save_info.h |
| index 69893f4bbd601f76f738644d3c8546d6e57ab8a5..13977a0e3d2491024e071a023071de9eded824ab 100644 |
| --- a/content/public/browser/download_save_info.h |
| +++ b/content/public/browser/download_save_info.h |
| @@ -22,6 +22,9 @@ namespace content { |
| // name, |offset| is set to the point where we left off, and |hash_state| will |
| // hold the state of the hash algorithm where we left off. |
| struct CONTENT_EXPORT DownloadSaveInfo { |
| + // The default value for |length|. |
| + static const int kLengthUnknown; |
|
David Trainor- moved to gerrit
2017/02/01 07:14:36
I don't feel strongly, but would a name that more
xingliu
2017/02/01 20:25:46
Changed to kLengthFullContent;
|
| + |
| DownloadSaveInfo(); |
| ~DownloadSaveInfo(); |
| DownloadSaveInfo(DownloadSaveInfo&& that); |
| @@ -41,6 +44,11 @@ struct CONTENT_EXPORT DownloadSaveInfo { |
| // The file offset at which to start the download. May be 0. |
| int64_t offset; |
| + // The length of the bytes from |offset|. Set to |kLengthUnknown| by default. |
| + // Ask to retrieve segment of the download file when length is greater than 0. |
|
David Trainor- moved to gerrit
2017/02/01 07:14:36
Nit, just curious about whether or not 0 is a vali
xingliu
2017/02/01 20:25:46
Yes, this is something weird, changed the const to
|
| + // Request the whole file when length is |kLengthUnknown|. |
| + int64_t length; |
| + |
| // The state of the hash. If specified, this hash state must indicate the |
| // state of the partial file for the first |offset| bytes. |
| std::unique_ptr<crypto::SecureHash> hash_state; |