| Index: content/browser/download/parallel_download_job.h
|
| diff --git a/content/browser/download/parallel_download_job.h b/content/browser/download/parallel_download_job.h
|
| index e3914ed0cbb7fd000326aefc7d1140419eaab557..22a6ce00d2e371bf7a6e3df9480d3728fbea42b2 100644
|
| --- a/content/browser/download/parallel_download_job.h
|
| +++ b/content/browser/download/parallel_download_job.h
|
| @@ -22,10 +22,12 @@ class CONTENT_EXPORT ParallelDownloadJob : public DownloadJobImpl {
|
| public:
|
| ParallelDownloadJob(
|
| DownloadItemImpl* download_item,
|
| - std::unique_ptr<DownloadRequestHandleInterface> request_handle);
|
| + std::unique_ptr<DownloadRequestHandleInterface> request_handle,
|
| + const DownloadCreateInfo& create_info);
|
| ~ParallelDownloadJob() override;
|
|
|
| // DownloadUrlJob implementation.
|
| + void Start() override;
|
| void Cancel(bool user_cancel) override;
|
| void Pause() override;
|
| void Resume(bool resume_request) override;
|
| @@ -41,6 +43,11 @@ class CONTENT_EXPORT ParallelDownloadJob : public DownloadJobImpl {
|
| // the last connection may take additional bytes.
|
| void ForkRequestsForNewDownload(int64_t bytes_received, int64_t total_bytes);
|
|
|
| + // Build parallel requests to download the remaining slices.
|
| + // TODO(qinmin): remove ForkRequestsForNewDownload() and move the logic into
|
| + // this function.
|
| + void BuildParallelRequests();
|
| +
|
| // Create one range request, virtual for testing.
|
| virtual void CreateRequest(int64_t offset, int64_t length);
|
|
|
| @@ -48,6 +55,10 @@ class CONTENT_EXPORT ParallelDownloadJob : public DownloadJobImpl {
|
| // request.
|
| int request_num_;
|
|
|
| + // Information about the initial request when download is started.
|
| + int64_t initial_request_offset_;
|
| + int64_t initial_request_length_;
|
| +
|
| // Subsequent tasks to send range requests.
|
| WorkerList workers_;
|
|
|
|
|