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

Unified Diff: net/base/file_stream_unittest.cc

Issue 1545233002: Convert Pass()→std::move() in //net (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 | « net/base/file_stream_context_posix.cc ('k') | net/base/keygen_handler_nss.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/file_stream_unittest.cc
diff --git a/net/base/file_stream_unittest.cc b/net/base/file_stream_unittest.cc
index 4304668f59e3e8ab24aa8f39f555d75f2b1d0031..a67a91cae1d442bc0091ab823a0099e77818f860 100644
--- a/net/base/file_stream_unittest.cc
+++ b/net/base/file_stream_unittest.cc
@@ -4,6 +4,8 @@
#include "net/base/file_stream.h"
+#include <utility>
+
#include "base/bind.h"
#include "base/callback.h"
#include "base/files/file.h"
@@ -117,7 +119,7 @@ TEST_F(FileStreamTest, UseFileHandle) {
// Seek to the beginning of the file and read.
scoped_ptr<FileStream> read_stream(
- new FileStream(file.Pass(), base::ThreadTaskRunnerHandle::Get()));
+ new FileStream(std::move(file), base::ThreadTaskRunnerHandle::Get()));
ASSERT_EQ(ERR_IO_PENDING, read_stream->Seek(0, callback64.callback()));
ASSERT_EQ(0, callback64.WaitForResult());
// Read into buffer and compare.
@@ -135,7 +137,7 @@ TEST_F(FileStreamTest, UseFileHandle) {
file.Initialize(temp_file_path(), flags);
scoped_ptr<FileStream> write_stream(
- new FileStream(file.Pass(), base::ThreadTaskRunnerHandle::Get()));
+ new FileStream(std::move(file), base::ThreadTaskRunnerHandle::Get()));
ASSERT_EQ(ERR_IO_PENDING, write_stream->Seek(0, callback64.callback()));
ASSERT_EQ(0, callback64.WaitForResult());
scoped_refptr<IOBufferWithSize> write_buffer = CreateTestDataBuffer();
@@ -752,7 +754,7 @@ TEST_F(FileStreamTest, WriteError) {
ASSERT_TRUE(file.IsValid());
scoped_ptr<FileStream> stream(
- new FileStream(file.Pass(), base::ThreadTaskRunnerHandle::Get()));
+ new FileStream(std::move(file), base::ThreadTaskRunnerHandle::Get()));
scoped_refptr<IOBuffer> buf = new IOBuffer(1);
buf->data()[0] = 0;
@@ -777,7 +779,7 @@ TEST_F(FileStreamTest, ReadError) {
ASSERT_TRUE(file.IsValid());
scoped_ptr<FileStream> stream(
- new FileStream(file.Pass(), base::ThreadTaskRunnerHandle::Get()));
+ new FileStream(std::move(file), base::ThreadTaskRunnerHandle::Get()));
scoped_refptr<IOBuffer> buf = new IOBuffer(1);
TestCompletionCallback callback;
« no previous file with comments | « net/base/file_stream_context_posix.cc ('k') | net/base/keygen_handler_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698