Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(789)

Unified Diff: content/browser/download/download_job_impl.h

Issue 2689373003: Introduce ParallelDownloadJob. (Closed)
Patch Set: nits. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/download/download_job_factory.cc ('k') | content/browser/download/download_job_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_job_impl.h
diff --git a/content/browser/download/download_job_impl.h b/content/browser/download/download_job_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..c24f92d4440a45a5d34db2c1daebcc4a127d2c35
--- /dev/null
+++ b/content/browser/download/download_job_impl.h
@@ -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.
+
+#ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_JOB_IMPL_H_
+#define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_JOB_IMPL_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 DownloadJobImpl : public DownloadJob {
+ public:
+ DownloadJobImpl(
+ DownloadItemImpl* download_item,
+ std::unique_ptr<DownloadRequestHandleInterface> request_handle);
+ ~DownloadJobImpl() override;
+
+ // DownloadJob implementation.
+ void Start() override;
+ void Cancel(bool user_cancel) override;
+ void Pause() override;
+ void Resume(bool resume_request) 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(DownloadJobImpl);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_JOB_IMPL_H_
« no previous file with comments | « content/browser/download/download_job_factory.cc ('k') | content/browser/download/download_job_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698