| Index: content/browser/download/download_worker.h
|
| diff --git a/content/browser/download/download_worker.h b/content/browser/download/download_worker.h
|
| index 75a7f96c04d2a70b3160ad678d59be91b83445dc..2206617b52f362e9719e05a4ed5aca263ea2e829 100644
|
| --- a/content/browser/download/download_worker.h
|
| +++ b/content/browser/download/download_worker.h
|
| @@ -23,9 +23,21 @@ namespace content {
|
| // download.
|
| class DownloadWorker : public UrlDownloader::Delegate {
|
| public:
|
| - DownloadWorker();
|
| + class Delegate {
|
| + public:
|
| + // Called when there is an error caused by the server response.
|
| + virtual void OnServerResponseError(DownloadWorker* worker,
|
| + DownloadInterruptReason reason) = 0;
|
| + };
|
| +
|
| + DownloadWorker(DownloadWorker::Delegate* delegate,
|
| + int64_t offset,
|
| + int64_t length);
|
| virtual ~DownloadWorker();
|
|
|
| + int64_t offset() const { return offset_; }
|
| + int64_t length() const { return length_; }
|
| +
|
| // Send network request to ask for a download.
|
| void SendRequest(std::unique_ptr<DownloadUrlParameters> params);
|
|
|
| @@ -46,6 +58,14 @@ class DownloadWorker : public UrlDownloader::Delegate {
|
| std::unique_ptr<UrlDownloader, BrowserThread::DeleteOnIOThread>
|
| downloader);
|
|
|
| + DownloadWorker::Delegate* const delegate_;
|
| +
|
| + // The starting position of the content for this worker to download.
|
| + int64_t offset_;
|
| +
|
| + // The length of the request. May be 0 to fetch to the end of the file.
|
| + int64_t length_;
|
| +
|
| // Used to control the network request. Live on UI thread.
|
| std::unique_ptr<DownloadRequestHandleInterface> request_handle_;
|
|
|
|
|