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

Unified Diff: mojo/public/cpp/bindings/lib/connector.cc

Issue 1535943002: Convert Pass()→std::move() in //mojo/public/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Regenerate correctly 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: mojo/public/cpp/bindings/lib/connector.cc
diff --git a/mojo/public/cpp/bindings/lib/connector.cc b/mojo/public/cpp/bindings/lib/connector.cc
index 6965a2f39919ed1a504a5f4430f8288a2fb84631..c5e9b7fe12e5a8bc06db0cc2fc620fb677e53056 100644
--- a/mojo/public/cpp/bindings/lib/connector.cc
+++ b/mojo/public/cpp/bindings/lib/connector.cc
@@ -5,6 +5,7 @@
#include "mojo/public/cpp/bindings/lib/connector.h"
#include <stdint.h>
+#include <utility>
#include "base/logging.h"
#include "base/macros.h"
@@ -44,7 +45,7 @@ Connector::Connector(ScopedMessagePipeHandle message_pipe,
ConnectorConfig config,
const MojoAsyncWaiter* waiter)
: waiter_(waiter),
- message_pipe_(message_pipe.Pass()),
+ message_pipe_(std::move(message_pipe)),
incoming_receiver_(nullptr),
async_wait_id_(0),
error_(false),
@@ -72,7 +73,7 @@ void Connector::CloseMessagePipe() {
CancelWait();
MayAutoLock locker(lock_.get());
- Close(message_pipe_.Pass());
+ Close(std::move(message_pipe_));
}
ScopedMessagePipeHandle Connector::PassMessagePipe() {
@@ -80,7 +81,7 @@ ScopedMessagePipeHandle Connector::PassMessagePipe() {
CancelWait();
MayAutoLock locker(lock_.get());
- return message_pipe_.Pass();
+ return std::move(message_pipe_);
}
void Connector::RaiseError() {
@@ -294,9 +295,9 @@ void Connector::HandleError(bool force_pipe_reset, bool force_async_handler) {
if (force_pipe_reset) {
CancelWait();
MayAutoLock locker(lock_.get());
- Close(message_pipe_.Pass());
+ Close(std::move(message_pipe_));
MessagePipe dummy_pipe;
- message_pipe_ = dummy_pipe.handle0.Pass();
+ message_pipe_ = std::move(dummy_pipe.handle0);
} else {
CancelWait();
}
« no previous file with comments | « mojo/public/cpp/bindings/lib/binding_state.h ('k') | mojo/public/cpp/bindings/lib/control_message_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698