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

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

Issue 2712713007: Make DownloadFileImpl handle multiple byte streams. (Closed)
Patch Set: Remove the AppendDataToFile call, fix the browsertest. 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_browsertest.cc ('k') | content/browser/download/download_file_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_file.h
diff --git a/content/browser/download/download_file.h b/content/browser/download/download_file.h
index 0e34ab24362d3c2d48af5722e5df7e8291e31e26..c155cb216ee8c8385b094ad9d0156afeb67c9119 100644
--- a/content/browser/download/download_file.h
+++ b/content/browser/download/download_file.h
@@ -7,6 +7,7 @@
#include <stdint.h>
+#include <memory>
#include <string>
#include "base/callback_forward.h"
@@ -18,6 +19,8 @@ class GURL;
namespace content {
+class ByteStreamReader;
+
// These objects live exclusively on the file thread and handle the writing
// operations for one download. These objects live only for the duration that
// the download is 'in progress': once the download has been completed or
@@ -45,6 +48,11 @@ class CONTENT_EXPORT DownloadFile {
// on success, or a network download interrupt reason on failure.
virtual void Initialize(const InitializeCallback& callback) = 0;
+ // Add a byte stream reader to write into a slice of the file, used for
+ // parallel download. Called on the file thread.
+ virtual void AddByteStream(std::unique_ptr<ByteStreamReader> stream_reader,
+ int64_t offset) = 0;
+
// Rename the download file to |full_path|. If that file exists
// |full_path| will be uniquified by suffixing " (<number>)" to the
// file name before the extension.
« no previous file with comments | « content/browser/download/download_browsertest.cc ('k') | content/browser/download/download_file_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698