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

Unified Diff: content/public/test/test_file_error_injector.cc

Issue 1544293002: Convert Pass()→std::move() in //content (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
Index: content/public/test/test_file_error_injector.cc
diff --git a/content/public/test/test_file_error_injector.cc b/content/public/test/test_file_error_injector.cc
index a6421b16270dbd7c0f337ce95dc6b8fcac2b20ce..96fcd95a3e48f57318f6f623829e240025f991de 100644
--- a/content/public/test/test_file_error_injector.cc
+++ b/content/public/test/test_file_error_injector.cc
@@ -4,6 +4,7 @@
#include "content/public/test/test_file_error_injector.h"
+#include <utility>
#include <vector>
#include "base/compiler_specific.h"
@@ -111,12 +112,17 @@ DownloadFileWithErrors::DownloadFileWithErrors(
const TestFileErrorInjector::FileErrorInfo& error_info,
const ConstructionCallback& ctor_callback,
const DestructionCallback& dtor_callback)
- : DownloadFileImpl(
- save_info.Pass(), default_download_directory, url, referrer_url,
- calculate_hash, stream.Pass(), bound_net_log, observer),
- source_url_(url),
- error_info_(error_info),
- destruction_callback_(dtor_callback) {
+ : DownloadFileImpl(std::move(save_info),
+ default_download_directory,
+ url,
+ referrer_url,
+ calculate_hash,
+ std::move(stream),
+ bound_net_log,
+ observer),
+ source_url_(url),
+ error_info_(error_info),
+ destruction_callback_(dtor_callback) {
// DownloadFiles are created on the UI thread and are destroyed on the FILE
// thread. Schedule the ConstructionCallback on the FILE thread so that if a
// DownloadItem schedules a DownloadFile to be destroyed and creates another
@@ -310,16 +316,9 @@ DownloadFile* DownloadFileWithErrorsFactory::CreateFile(
}
return new DownloadFileWithErrors(
- save_info.Pass(),
- default_download_directory,
- url,
- referrer_url,
- calculate_hash,
- stream.Pass(),
- bound_net_log,
- observer,
- injected_errors_[url.spec()],
- construction_callback_,
+ std::move(save_info), default_download_directory, url, referrer_url,
+ calculate_hash, std::move(stream), bound_net_log, observer,
+ injected_errors_[url.spec()], construction_callback_,
destruction_callback_);
}
@@ -354,7 +353,7 @@ TestFileErrorInjector::TestFileErrorInjector(
created_factory_);
download_manager_->SetDownloadFileFactoryForTesting(
- download_file_factory.Pass());
+ std::move(download_file_factory));
}
TestFileErrorInjector::~TestFileErrorInjector() {
« no previous file with comments | « content/public/test/test_download_request_handler.cc ('k') | content/public/test/test_file_system_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698