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

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

Issue 1545243002: Convert Pass()→std::move() in //content/browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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_item_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 9bf2dd2f332cd49eacf38330a27796f45ae764ab..9630a49b0662a3c79427c624ff078031bc593563 100644
--- a/content/browser/download/download_file_unittest.cc
+++ b/content/browser/download/download_file_unittest.cc
@@ -4,6 +4,7 @@
#include <stddef.h>
#include <stdint.h>
+#include <utility>
#include "base/files/file.h"
#include "base/files/file_util.h"
@@ -82,12 +83,12 @@ class TestDownloadFileImpl : public DownloadFileImpl {
scoped_ptr<ByteStreamReader> stream,
const net::BoundNetLog& bound_net_log,
base::WeakPtr<DownloadDestinationObserver> observer)
- : DownloadFileImpl(save_info.Pass(),
+ : DownloadFileImpl(std::move(save_info),
default_downloads_directory,
url,
referrer_url,
calculate_hash,
- stream.Pass(),
+ std::move(stream),
bound_net_log,
observer) {}
@@ -176,16 +177,14 @@ class DownloadFileTest : public testing::Test {
scoped_ptr<DownloadSaveInfo> save_info(new DownloadSaveInfo());
scoped_ptr<TestDownloadFileImpl> download_file_impl(
- new TestDownloadFileImpl(save_info.Pass(),
- base::FilePath(),
- GURL(), // Source
- GURL(), // Referrer
- calculate_hash,
- scoped_ptr<ByteStreamReader>(input_stream_),
- net::BoundNetLog(),
- observer_factory_.GetWeakPtr()));
+ new TestDownloadFileImpl(
+ std::move(save_info), base::FilePath(),
+ GURL(), // Source
+ GURL(), // Referrer
+ calculate_hash, scoped_ptr<ByteStreamReader>(input_stream_),
+ net::BoundNetLog(), observer_factory_.GetWeakPtr()));
download_file_impl->SetClientGuid("12345678-ABCD-1234-DCBA-123456789ABC");
- download_file_ = download_file_impl.Pass();
+ download_file_ = std::move(download_file_impl);
EXPECT_CALL(*input_stream_, Read(_, _))
.WillOnce(Return(ByteStreamReader::STREAM_EMPTY))
« no previous file with comments | « content/browser/download/download_file_impl.cc ('k') | content/browser/download/download_item_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698