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

Unified Diff: content/browser/fileapi/copy_or_move_file_validator_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
Index: content/browser/fileapi/copy_or_move_file_validator_unittest.cc
diff --git a/content/browser/fileapi/copy_or_move_file_validator_unittest.cc b/content/browser/fileapi/copy_or_move_file_validator_unittest.cc
index c099f29b7c32b60b80947f4f0e96fd001acb2de2..2b62b5351c854a2aaded799afa5c699a7de3497d 100644
--- a/content/browser/fileapi/copy_or_move_file_validator_unittest.cc
+++ b/content/browser/fileapi/copy_or_move_file_validator_unittest.cc
@@ -4,6 +4,7 @@
#include <stddef.h>
#include <stdint.h>
+#include <utility>
#include "base/bind.h"
#include "base/files/file_path.h"
@@ -102,7 +103,7 @@ class CopyOrMoveFileValidatorTestHelper {
scoped_ptr<storage::CopyOrMoveFileValidatorFactory> factory) {
TestFileSystemBackend* backend = static_cast<TestFileSystemBackend*>(
file_system_context_->GetFileSystemBackend(kWithValidatorType));
- backend->InitializeCopyOrMoveFileValidatorFactory(factory.Pass());
+ backend->InitializeCopyOrMoveFileValidatorFactory(std::move(factory));
}
void CopyTest(base::File::Error expected) {
@@ -282,7 +283,7 @@ TEST(CopyOrMoveFileValidatorTest, AcceptAll) {
helper.SetUp();
scoped_ptr<CopyOrMoveFileValidatorFactory> factory(
new TestCopyOrMoveFileValidatorFactory(VALID));
- helper.SetMediaCopyOrMoveFileValidatorFactory(factory.Pass());
+ helper.SetMediaCopyOrMoveFileValidatorFactory(std::move(factory));
helper.CopyTest(base::File::FILE_OK);
helper.MoveTest(base::File::FILE_OK);
@@ -295,7 +296,7 @@ TEST(CopyOrMoveFileValidatorTest, AcceptNone) {
helper.SetUp();
scoped_ptr<CopyOrMoveFileValidatorFactory> factory(
new TestCopyOrMoveFileValidatorFactory(PRE_WRITE_INVALID));
- helper.SetMediaCopyOrMoveFileValidatorFactory(factory.Pass());
+ helper.SetMediaCopyOrMoveFileValidatorFactory(std::move(factory));
helper.CopyTest(base::File::FILE_ERROR_SECURITY);
helper.MoveTest(base::File::FILE_ERROR_SECURITY);
@@ -309,11 +310,11 @@ TEST(CopyOrMoveFileValidatorTest, OverrideValidator) {
helper.SetUp();
scoped_ptr<CopyOrMoveFileValidatorFactory> reject_factory(
new TestCopyOrMoveFileValidatorFactory(PRE_WRITE_INVALID));
- helper.SetMediaCopyOrMoveFileValidatorFactory(reject_factory.Pass());
+ helper.SetMediaCopyOrMoveFileValidatorFactory(std::move(reject_factory));
scoped_ptr<CopyOrMoveFileValidatorFactory> accept_factory(
new TestCopyOrMoveFileValidatorFactory(VALID));
- helper.SetMediaCopyOrMoveFileValidatorFactory(accept_factory.Pass());
+ helper.SetMediaCopyOrMoveFileValidatorFactory(std::move(accept_factory));
helper.CopyTest(base::File::FILE_ERROR_SECURITY);
helper.MoveTest(base::File::FILE_ERROR_SECURITY);
@@ -326,7 +327,7 @@ TEST(CopyOrMoveFileValidatorTest, RejectPostWrite) {
helper.SetUp();
scoped_ptr<CopyOrMoveFileValidatorFactory> factory(
new TestCopyOrMoveFileValidatorFactory(POST_WRITE_INVALID));
- helper.SetMediaCopyOrMoveFileValidatorFactory(factory.Pass());
+ helper.SetMediaCopyOrMoveFileValidatorFactory(std::move(factory));
helper.CopyTest(base::File::FILE_ERROR_SECURITY);
helper.MoveTest(base::File::FILE_ERROR_SECURITY);

Powered by Google App Engine
This is Rietveld 408576698