Chromium Code Reviews| Index: content/browser/download/download_url_job.h |
| diff --git a/content/browser/download/download_url_job.h b/content/browser/download/download_url_job.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..6484e1f0a20d000350bb2f41a7383d792ae0c021 |
| --- /dev/null |
| +++ b/content/browser/download/download_url_job.h |
| @@ -0,0 +1,39 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_URL_JOB_H_ |
| +#define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_URL_JOB_H_ |
| + |
| +#include "base/macros.h" |
| +#include "content/browser/download/download_item_impl.h" |
| +#include "content/browser/download/download_job.h" |
| +#include "content/browser/download/download_request_handle.h" |
| +#include "content/common/content_export.h" |
| + |
| +namespace content { |
| + |
| +class CONTENT_EXPORT DownloadUrlJob : public DownloadJob { |
| + public: |
| + DownloadUrlJob( |
|
asanka
2017/02/16 16:27:39
explicit
xingliu
2017/02/20 18:59:11
Done, but omitted the explicit. Now we also pass D
|
| + std::unique_ptr<DownloadRequestHandleInterface> request_handle); |
| + ~DownloadUrlJob() override; |
| + |
| + // DownloadJob implementation. |
| + void Start() override; |
| + void Cancel(bool user_cancel) override; |
| + void Pause() override; |
| + void Resume() override; |
| + WebContents* GetWebContents() const override; |
| + |
| + private: |
| + // Used to perform operations on network request. |
| + // Can be null on interrupted download. |
| + std::unique_ptr<DownloadRequestHandleInterface> request_handle_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(DownloadUrlJob); |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_URL_JOB_H_ |