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

Unified Diff: content/browser/download/download_file_unittest.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 | « content/browser/download/download_file_impl.cc ('k') | content/browser/download/download_manager_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_unittest.cc
diff --git a/content/browser/download/download_file_unittest.cc b/content/browser/download/download_file_unittest.cc
index ecf45ef6d146d4a6e0755a0292f54f89ec0a36ac..055b883e9364a894b1b77c7fe48a1220d93caefe 100644
--- a/content/browser/download/download_file_unittest.cc
+++ b/content/browser/download/download_file_unittest.cc
@@ -110,15 +110,18 @@ enum DownloadFileRenameMethodType { RENAME_AND_UNIQUIFY, RENAME_AND_ANNOTATE };
// retries renames failed due to ACCESS_DENIED.
class TestDownloadFileImpl : public DownloadFileImpl {
public:
- TestDownloadFileImpl(std::unique_ptr<DownloadSaveInfo> save_info,
- const base::FilePath& default_downloads_directory,
- std::unique_ptr<ByteStreamReader> stream,
- const net::NetLogWithSource& net_log,
- bool is_sparse_file,
- base::WeakPtr<DownloadDestinationObserver> observer)
+ TestDownloadFileImpl(
+ 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,
+ bool is_sparse_file,
+ base::WeakPtr<DownloadDestinationObserver> observer)
: DownloadFileImpl(std::move(save_info),
default_downloads_directory,
std::move(stream),
+ received_slices,
net_log,
is_sparse_file,
observer) {}
@@ -210,6 +213,7 @@ class DownloadFileTest : public testing::Test {
download_file_.reset(new TestDownloadFileImpl(
std::move(save_info), base::FilePath(),
std::unique_ptr<ByteStreamReader>(input_stream_),
+ std::vector<DownloadItem::ReceivedSlice>(),
net::NetLogWithSource(), is_sparse_file,
observer_factory_.GetWeakPtr()));
« no previous file with comments | « content/browser/download/download_file_impl.cc ('k') | content/browser/download/download_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698