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

Unified Diff: mojo/public/cpp/bindings/strong_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/map.h ('k') | mojo/public/cpp/bindings/tests/array_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/strong_binding.h
diff --git a/mojo/public/cpp/bindings/strong_binding.h b/mojo/public/cpp/bindings/strong_binding.h
index 863bca1ab62a06cf087974d5f9374a60cc50b475..777b512cace37261233d814d7f79beb6576fc0f7 100644
--- a/mojo/public/cpp/bindings/strong_binding.h
+++ b/mojo/public/cpp/bindings/strong_binding.h
@@ -6,6 +6,7 @@
#define MOJO_PUBLIC_CPP_BINDINGS_STRONG_BINDING_H_
#include <assert.h>
+#include <utility>
#include "mojo/public/c/environment/async_waiter.h"
#include "mojo/public/cpp/bindings/binding.h"
@@ -55,7 +56,7 @@ class StrongBinding {
ScopedMessagePipeHandle handle,
const MojoAsyncWaiter* waiter = Environment::GetDefaultAsyncWaiter())
: StrongBinding(impl) {
- Bind(handle.Pass(), waiter);
+ Bind(std::move(handle), waiter);
}
StrongBinding(
@@ -71,7 +72,7 @@ class StrongBinding {
InterfaceRequest<Interface> request,
const MojoAsyncWaiter* waiter = Environment::GetDefaultAsyncWaiter())
: StrongBinding(impl) {
- Bind(request.Pass(), waiter);
+ Bind(std::move(request), waiter);
}
~StrongBinding() {}
@@ -80,7 +81,7 @@ class StrongBinding {
ScopedMessagePipeHandle handle,
const MojoAsyncWaiter* waiter = Environment::GetDefaultAsyncWaiter()) {
assert(!binding_.is_bound());
- binding_.Bind(handle.Pass(), waiter);
+ binding_.Bind(std::move(handle), waiter);
binding_.set_connection_error_handler([this]() { OnConnectionError(); });
}
@@ -96,7 +97,7 @@ class StrongBinding {
InterfaceRequest<Interface> request,
const MojoAsyncWaiter* waiter = Environment::GetDefaultAsyncWaiter()) {
assert(!binding_.is_bound());
- binding_.Bind(request.Pass(), waiter);
+ binding_.Bind(std::move(request), waiter);
binding_.set_connection_error_handler([this]() { OnConnectionError(); });
}
« no previous file with comments | « mojo/public/cpp/bindings/map.h ('k') | mojo/public/cpp/bindings/tests/array_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698