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

Unified Diff: mojo/public/cpp/bindings/binding.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
« no previous file with comments | « mojo/public/cpp/bindings/associated_interface_request.h ('k') | mojo/public/cpp/bindings/interface_ptr.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/binding.h
diff --git a/mojo/public/cpp/bindings/binding.h b/mojo/public/cpp/bindings/binding.h
index c0a8be574ec7abc966b89c3d8b3d7bd71604f959..6cb4e80f28b16b32b3c5b251bd478daa320849ac 100644
--- a/mojo/public/cpp/bindings/binding.h
+++ b/mojo/public/cpp/bindings/binding.h
@@ -5,6 +5,8 @@
#ifndef MOJO_PUBLIC_CPP_BINDINGS_BINDING_H_
#define MOJO_PUBLIC_CPP_BINDINGS_BINDING_H_
+#include <utility>
+
#include "base/macros.h"
#include "mojo/public/c/environment/async_waiter.h"
#include "mojo/public/cpp/bindings/callback.h"
@@ -73,7 +75,7 @@ class Binding {
ScopedMessagePipeHandle handle,
const MojoAsyncWaiter* waiter = Environment::GetDefaultAsyncWaiter())
: Binding(impl) {
- Bind(handle.Pass(), waiter);
+ Bind(std::move(handle), waiter);
}
// Constructs a completed binding of |impl| to a new message pipe, passing the
@@ -110,7 +112,7 @@ class Binding {
void Bind(
ScopedMessagePipeHandle handle,
const MojoAsyncWaiter* waiter = Environment::GetDefaultAsyncWaiter()) {
- internal_state_.Bind(handle.Pass(), waiter);
+ internal_state_.Bind(std::move(handle), waiter);
}
// Completes a binding that was constructed with only an interface
@@ -123,10 +125,10 @@ class Binding {
InterfacePtr<Interface>* ptr,
const MojoAsyncWaiter* waiter = Environment::GetDefaultAsyncWaiter()) {
MessagePipe pipe;
- ptr->Bind(
- InterfacePtrInfo<Interface>(pipe.handle0.Pass(), Interface::Version_),
- waiter);
- Bind(pipe.handle1.Pass(), waiter);
+ ptr->Bind(InterfacePtrInfo<Interface>(std::move(pipe.handle0),
+ Interface::Version_),
+ waiter);
+ Bind(std::move(pipe.handle1), waiter);
}
// Completes a binding that was constructed with only an interface
« no previous file with comments | « mojo/public/cpp/bindings/associated_interface_request.h ('k') | mojo/public/cpp/bindings/interface_ptr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698