| Index: content/public/browser/download_item.h
|
| diff --git a/content/public/browser/download_item.h b/content/public/browser/download_item.h
|
| index 32963bfd476415a5b22a75857900d68b462c7527..e6a2656eadc968557099b5330fe3fb21025aa8f2 100644
|
| --- a/content/public/browser/download_item.h
|
| +++ b/content/public/browser/download_item.h
|
| @@ -102,6 +102,18 @@ class CONTENT_EXPORT DownloadItem : public base::SupportsUserData {
|
| virtual ~Observer() {}
|
| };
|
|
|
| + struct CONTENT_EXPORT ReceivedSlice {
|
| + ReceivedSlice(int64_t offset, int64_t received_bytes)
|
| + : offset(offset), received_bytes(received_bytes) {}
|
| +
|
| + bool operator==(const ReceivedSlice& rhs) const {
|
| + return offset == rhs.offset && received_bytes == rhs.received_bytes;
|
| + }
|
| +
|
| + int64_t offset;
|
| + int64_t received_bytes;
|
| + };
|
| +
|
| ~DownloadItem() override {}
|
|
|
| // Observation ---------------------------------------------------------------
|
| @@ -349,6 +361,10 @@ class CONTENT_EXPORT DownloadItem : public base::SupportsUserData {
|
| // file.
|
| virtual int64_t GetReceivedBytes() const = 0;
|
|
|
| + // Return the slices that have been received so far. This is only used
|
| + // when parallel downloading is enabled.
|
| + virtual const std::vector<ReceivedSlice>& GetReceivedSlices() const = 0;
|
| +
|
| // Time the download was first started. This timestamp is always valid and
|
| // doesn't change.
|
| virtual base::Time GetStartTime() const = 0;
|
|
|