Index: mojo/common/weak_binding_set.h |
diff --git a/mojo/common/weak_binding_set.h b/mojo/common/weak_binding_set.h |
index c3736ff901787f2879dfe1696f7559b080ee1f39..d324224f3029cb264a18cf94d4282cd58cd58bb4 100644 |
--- a/mojo/common/weak_binding_set.h |
+++ b/mojo/common/weak_binding_set.h |
@@ -6,6 +6,7 @@ |
#define MOJO_COMMON_WEAK_BINDING_SET_H_ |
#include <algorithm> |
+#include <utility> |
#include <vector> |
#include "base/memory/weak_ptr.h" |
@@ -32,7 +33,7 @@ class WeakBindingSet { |
void AddBinding(Interface* impl, |
InterfaceRequest<GenericInterface> request) { |
- auto binding = new WeakBinding<Interface>(impl, request.Pass()); |
+ auto binding = new WeakBinding<Interface>(impl, std::move(request)); |
binding->set_connection_error_handler([this]() { OnConnectionError(); }); |
bindings_.push_back(binding->GetWeakPtr()); |
} |
@@ -74,8 +75,7 @@ class WeakBinding { |
using GenericInterface = typename Interface::GenericInterface; |
WeakBinding(Interface* impl, InterfaceRequest<GenericInterface> request) |
- : binding_(impl, request.Pass()), |
- weak_ptr_factory_(this) { |
+ : binding_(impl, std::move(request)), weak_ptr_factory_(this) { |
binding_.set_connection_error_handler([this]() { OnConnectionError(); }); |
} |