| Index: content/browser/download/download_url_job.cc
|
| diff --git a/content/browser/download/download_url_job.cc b/content/browser/download/download_url_job.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..4a354fb59308983b209520979c57effbd20f3128
|
| --- /dev/null
|
| +++ b/content/browser/download/download_url_job.cc
|
| @@ -0,0 +1,40 @@
|
| +// 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.
|
| +
|
| +#include "content/browser/download/download_url_job.h"
|
| +
|
| +#include "content/public/browser/web_contents.h"
|
| +
|
| +namespace content {
|
| +
|
| +DownloadUrlJob::DownloadUrlJob(
|
| + std::unique_ptr<DownloadRequestHandleInterface> request_handle)
|
| + : request_handle_(std::move(request_handle)) {}
|
| +
|
| +DownloadUrlJob::~DownloadUrlJob() = default;
|
| +
|
| +void DownloadUrlJob::Start() {
|
| + InitializeDownloadFile();
|
| +}
|
| +
|
| +void DownloadUrlJob::Cancel(bool user_cancel) {
|
| + if (request_handle_)
|
| + request_handle_->CancelRequest();
|
| +}
|
| +
|
| +void DownloadUrlJob::Pause() {
|
| + if (request_handle_)
|
| + request_handle_->PauseRequest();
|
| +}
|
| +
|
| +void DownloadUrlJob::Resume() {
|
| + if (request_handle_)
|
| + request_handle_->ResumeRequest();
|
| +}
|
| +
|
| +WebContents* DownloadUrlJob::GetWebContents() const {
|
| + return request_handle_ ? request_handle_->GetWebContents() : nullptr;
|
| +}
|
| +
|
| +} // namespace content
|
|
|