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

Unified Diff: mojo/public/cpp/bindings/tests/request_response_unittest.cc

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/tests/request_response_unittest.cc
diff --git a/mojo/public/cpp/bindings/tests/request_response_unittest.cc b/mojo/public/cpp/bindings/tests/request_response_unittest.cc
index 1e85d4a383dbaff57a05759dcf4f0e34d2b0f0c3..75fd6c5851611f3fa751941c94464d87a756fdc4 100644
--- a/mojo/public/cpp/bindings/tests/request_response_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/request_response_unittest.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <utility>
+
#include "base/message_loop/message_loop.h"
#include "mojo/message_pump/message_pump_mojo.h"
#include "mojo/public/cpp/bindings/binding.h"
@@ -17,7 +19,7 @@ namespace {
class ProviderImpl : public sample::Provider {
public:
explicit ProviderImpl(InterfaceRequest<sample::Provider> request)
- : binding_(this, request.Pass()) {}
+ : binding_(this, std::move(request)) {}
void EchoString(const String& a,
const Callback<void(String)>& callback) override {
@@ -36,7 +38,7 @@ class ProviderImpl : public sample::Provider {
void EchoMessagePipeHandle(
ScopedMessagePipeHandle a,
const Callback<void(ScopedMessagePipeHandle)>& callback) override {
- callback.Run(a.Pass());
+ callback.Run(std::move(a));
}
void EchoEnum(sample::Enum a,
@@ -124,7 +126,7 @@ TEST_F(RequestResponseTest, EchoMessagePipeHandle) {
ProviderImpl provider_impl(GetProxy(&provider));
MessagePipe pipe2;
- provider->EchoMessagePipeHandle(pipe2.handle1.Pass(),
+ provider->EchoMessagePipeHandle(std::move(pipe2.handle1),
MessagePipeWriter("hello"));
PumpMessages();

Powered by Google App Engine
This is Rietveld 408576698