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

Unified Diff: net/base/file_stream_context.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.cc ('k') | net/base/file_stream_context_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/file_stream_context.cc
diff --git a/net/base/file_stream_context.cc b/net/base/file_stream_context.cc
index 6d77d6d778044a931b09d886ed2a3c9f225df069..7da28a99f2e7a7f36b599dd72750b6e58defb641 100644
--- a/net/base/file_stream_context.cc
+++ b/net/base/file_stream_context.cc
@@ -52,9 +52,7 @@ FileStream::Context::OpenResult::OpenResult() {
FileStream::Context::OpenResult::OpenResult(base::File file,
IOResult error_code)
- : file(file.Pass()),
- error_code(error_code) {
-}
+ : file(std::move(file)), error_code(error_code) {}
FileStream::Context::OpenResult::OpenResult(OpenResult&& other)
: file(std::move(other.file)), error_code(other.error_code) {}
@@ -174,7 +172,7 @@ FileStream::Context::OpenResult FileStream::Context::OpenFileImpl(
return OpenResult(base::File(),
IOResult::FromOSError(logging::GetLastSystemErrorCode()));
- return OpenResult(file.Pass(), IOResult(OK, 0));
+ return OpenResult(std::move(file), IOResult(OK, 0));
}
FileStream::Context::IOResult FileStream::Context::CloseFileImpl() {
@@ -191,7 +189,7 @@ FileStream::Context::IOResult FileStream::Context::FlushFileImpl() {
void FileStream::Context::OnOpenCompleted(const CompletionCallback& callback,
OpenResult open_result) {
- file_ = open_result.file.Pass();
+ file_ = std::move(open_result.file);
if (file_.IsValid() && !orphaned_)
OnFileOpened();
« no previous file with comments | « net/base/file_stream.cc ('k') | net/base/file_stream_context_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698