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

Unified Diff: mojo/public/cpp/bindings/lib/interface_ptr_state.h

Issue 1535943002: Convert Pass()→std::move() in //mojo/public/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove self-move checks to avoid triggering clang warning. 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/interface_ptr_state.h
diff --git a/mojo/public/cpp/bindings/lib/interface_ptr_state.h b/mojo/public/cpp/bindings/lib/interface_ptr_state.h
index d203031819b2a96fd6ce6724529d78b8788e4ce3..4e1c6318dc95bdd585c4e312789e1e29226abf9d 100644
--- a/mojo/public/cpp/bindings/lib/interface_ptr_state.h
+++ b/mojo/public/cpp/bindings/lib/interface_ptr_state.h
@@ -6,6 +6,7 @@
#define MOJO_PUBLIC_CPP_BINDINGS_LIB_INTERFACE_PTR_STATE_H_
#include <algorithm> // For |std::swap()|.
+#include <utility>
#include "base/logging.h"
#include "base/macros.h"
@@ -123,7 +124,7 @@ class InterfacePtrState<Interface, false> {
// shouldn't be reused.
InterfacePtrInfo<GenericInterface> PassInterface() {
return InterfacePtrInfo<GenericInterface>(
- router_ ? router_->PassMessagePipe() : handle_.Pass(), version_);
+ router_ ? router_->PassMessagePipe() : std::move(handle_), version_);
}
bool is_bound() const { return handle_.is_valid() || router_; }
@@ -170,7 +171,7 @@ class InterfacePtrState<Interface, false> {
filters.Append<MessageHeaderValidator>();
filters.Append<typename Interface::ResponseValidator_>();
- router_ = new Router(handle_.Pass(), filters.Pass(), waiter_);
+ router_ = new Router(std::move(handle_), std::move(filters), waiter_);
waiter_ = nullptr;
proxy_ = new Proxy(router_);
@@ -332,7 +333,7 @@ class InterfacePtrState<Interface, true> {
return;
}
- router_ = new MultiplexRouter(true, handle_.Pass(), waiter_);
+ router_ = new MultiplexRouter(true, std::move(handle_), waiter_);
endpoint_client_.reset(new InterfaceEndpointClient(
router_->CreateLocalEndpointHandle(kMasterInterfaceId), nullptr,
make_scoped_ptr(new typename Interface::ResponseValidator_())));

Powered by Google App Engine
This is Rietveld 408576698