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

Unified Diff: content/browser/download/download_browsertest.cc

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 | « no previous file | content/browser/download/download_file_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_browsertest.cc
diff --git a/content/browser/download/download_browsertest.cc b/content/browser/download/download_browsertest.cc
index 18bedef412d7cc4f29325bd9aa4d68f19e969bc6..84d1e66a6510bcb4985d6c8ad2215132c4f564ea 100644
--- a/content/browser/download/download_browsertest.cc
+++ b/content/browser/download/download_browsertest.cc
@@ -135,6 +135,7 @@ class DownloadFileWithDelay : public DownloadFileImpl {
std::unique_ptr<DownloadSaveInfo> save_info,
const base::FilePath& default_download_directory,
std::unique_ptr<ByteStreamReader> stream,
+ const std::vector<DownloadItem::ReceivedSlice>& received_slices,
const net::NetLogWithSource& net_log,
std::unique_ptr<device::PowerSaveBlocker> power_save_blocker,
base::WeakPtr<DownloadDestinationObserver> observer,
@@ -181,6 +182,7 @@ class DownloadFileWithDelayFactory : public DownloadFileFactory {
std::unique_ptr<DownloadSaveInfo> save_info,
const base::FilePath& default_download_directory,
std::unique_ptr<ByteStreamReader> stream,
+ const std::vector<DownloadItem::ReceivedSlice>& received_slices,
const net::NetLogWithSource& net_log,
base::WeakPtr<DownloadDestinationObserver> observer) override;
@@ -202,6 +204,7 @@ DownloadFileWithDelay::DownloadFileWithDelay(
std::unique_ptr<DownloadSaveInfo> save_info,
const base::FilePath& default_download_directory,
std::unique_ptr<ByteStreamReader> stream,
+ const std::vector<DownloadItem::ReceivedSlice>& received_slices,
const net::NetLogWithSource& net_log,
std::unique_ptr<device::PowerSaveBlocker> power_save_blocker,
base::WeakPtr<DownloadDestinationObserver> observer,
@@ -209,6 +212,7 @@ DownloadFileWithDelay::DownloadFileWithDelay(
: DownloadFileImpl(std::move(save_info),
default_download_directory,
std::move(stream),
+ received_slices,
net_log,
false,
observer),
@@ -263,6 +267,7 @@ DownloadFile* DownloadFileWithDelayFactory::CreateFile(
std::unique_ptr<DownloadSaveInfo> save_info,
const base::FilePath& default_download_directory,
std::unique_ptr<ByteStreamReader> stream,
+ const std::vector<DownloadItem::ReceivedSlice>& received_slices,
const net::NetLogWithSource& net_log,
base::WeakPtr<DownloadDestinationObserver> observer) {
std::unique_ptr<device::PowerSaveBlocker> psb(new device::PowerSaveBlocker(
@@ -273,6 +278,7 @@ DownloadFile* DownloadFileWithDelayFactory::CreateFile(
return new DownloadFileWithDelay(std::move(save_info),
default_download_directory,
std::move(stream),
+ received_slices,
net_log,
std::move(psb),
observer,
@@ -308,12 +314,14 @@ class CountingDownloadFile : public DownloadFileImpl {
std::unique_ptr<DownloadSaveInfo> save_info,
const base::FilePath& default_downloads_directory,
std::unique_ptr<ByteStreamReader> stream,
+ const std::vector<DownloadItem::ReceivedSlice>& received_slices,
const net::NetLogWithSource& net_log,
std::unique_ptr<device::PowerSaveBlocker> power_save_blocker,
base::WeakPtr<DownloadDestinationObserver> observer)
: DownloadFileImpl(std::move(save_info),
default_downloads_directory,
std::move(stream),
+ received_slices,
net_log,
false,
observer) {}
@@ -363,6 +371,7 @@ class CountingDownloadFileFactory : public DownloadFileFactory {
std::unique_ptr<DownloadSaveInfo> save_info,
const base::FilePath& default_downloads_directory,
std::unique_ptr<ByteStreamReader> stream,
+ const std::vector<DownloadItem::ReceivedSlice>& received_slices,
const net::NetLogWithSource& net_log,
base::WeakPtr<DownloadDestinationObserver> observer) override {
std::unique_ptr<device::PowerSaveBlocker> psb(new device::PowerSaveBlocker(
@@ -373,6 +382,7 @@ class CountingDownloadFileFactory : public DownloadFileFactory {
return new CountingDownloadFile(std::move(save_info),
default_downloads_directory,
std::move(stream),
+ received_slices,
net_log,
std::move(psb),
observer);
« no previous file with comments | « no previous file | content/browser/download/download_file_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698