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

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

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/binding_state.h
diff --git a/mojo/public/cpp/bindings/lib/binding_state.h b/mojo/public/cpp/bindings/lib/binding_state.h
index 496dcf607fbf429ae912622bb7c8f32ef73fddaf..3d025fbd5740509997fcacc652ca5ef01cf546d0 100644
--- a/mojo/public/cpp/bindings/lib/binding_state.h
+++ b/mojo/public/cpp/bindings/lib/binding_state.h
@@ -5,6 +5,8 @@
#ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDING_STATE_H_
#define MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDING_STATE_H_
+#include <utility>
+
#include "base/logging.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
@@ -54,7 +56,8 @@ class BindingState<Interface, false> {
filters.Append<internal::MessageHeaderValidator>();
filters.Append<typename Interface::RequestValidator_>();
- router_ = new internal::Router(handle.Pass(), filters.Pass(), waiter);
+ router_ =
+ new internal::Router(std::move(handle), std::move(filters), waiter);
router_->set_incoming_receiver(&stub_);
router_->set_connection_error_handler(
[this]() { connection_error_handler_.Run(); });
@@ -87,7 +90,7 @@ class BindingState<Interface, false> {
InterfaceRequest<GenericInterface> request =
MakeRequest<GenericInterface>(router_->PassMessagePipe());
DestroyRouter();
- return request.Pass();
+ return std::move(request);
}
void set_connection_error_handler(const Closure& error_handler) {
@@ -146,7 +149,7 @@ class BindingState<Interface, true> {
void Bind(ScopedMessagePipeHandle handle, const MojoAsyncWaiter* waiter) {
DCHECK(!router_);
- router_ = new internal::MultiplexRouter(false, handle.Pass(), waiter);
+ router_ = new internal::MultiplexRouter(false, std::move(handle), waiter);
stub_.serialization_context()->router = router_;
endpoint_client_.reset(new internal::InterfaceEndpointClient(
« no previous file with comments | « mojo/public/cpp/bindings/lib/associated_interface_ptr_state.h ('k') | mojo/public/cpp/bindings/lib/connector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698