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

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

Issue 2734493003: Pass slice info to DownloadFileImpl (Closed)
Patch Set: rebase Created 3 years, 9 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_file_factory.cc ('k') | content/browser/download/download_file_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_file_impl.h
diff --git a/content/browser/download/download_file_impl.h b/content/browser/download/download_file_impl.h
index 83942d67f2b0a36c04b5e81db1153c90dc3f8425..61f1f4d90bb054a524b32e402f78111c7d1de5a0 100644
--- a/content/browser/download/download_file_impl.h
+++ b/content/browser/download/download_file_impl.h
@@ -13,6 +13,7 @@
#include <memory>
#include <string>
#include <unordered_map>
+#include <vector>
#include "base/files/file.h"
#include "base/macros.h"
@@ -24,6 +25,7 @@
#include "content/browser/byte_stream.h"
#include "content/browser/download/base_file.h"
#include "content/browser/download/rate_estimator.h"
+#include "content/public/browser/download_item.h"
#include "content/public/browser/download_save_info.h"
#include "net/log/net_log_with_source.h"
@@ -41,12 +43,14 @@ class CONTENT_EXPORT DownloadFileImpl : public DownloadFile {
// Note that the DownloadFileImpl automatically reads from the passed in
// stream, and sends updates and status of those reads to the
// DownloadDestinationObserver.
- DownloadFileImpl(std::unique_ptr<DownloadSaveInfo> save_info,
- const base::FilePath& default_downloads_directory,
- std::unique_ptr<ByteStreamReader> stream_reader,
- const net::NetLogWithSource& net_log,
- bool is_sparse_file,
- base::WeakPtr<DownloadDestinationObserver> observer);
+ DownloadFileImpl(
+ std::unique_ptr<DownloadSaveInfo> save_info,
+ const base::FilePath& default_downloads_directory,
+ std::unique_ptr<ByteStreamReader> stream_reader,
+ const std::vector<DownloadItem::ReceivedSlice>& received_slices,
+ const net::NetLogWithSource& net_log,
+ bool is_sparse_file,
+ base::WeakPtr<DownloadDestinationObserver> observer);
~DownloadFileImpl() override;
@@ -220,6 +224,8 @@ class CONTENT_EXPORT DownloadFileImpl : public DownloadFile {
base::TimeTicks download_start_;
RateEstimator rate_estimator_;
+ std::vector<DownloadItem::ReceivedSlice> received_slices_;
+
base::WeakPtr<DownloadDestinationObserver> observer_;
base::WeakPtrFactory<DownloadFileImpl> weak_factory_;
« no previous file with comments | « content/browser/download/download_file_factory.cc ('k') | content/browser/download/download_file_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698