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

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: 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/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 0196f4ce07a856faf5a03cb1dbfefa108f851ca6..fa4ffa186960edfac85d6e396426170deb319a30 100644
--- a/mojo/public/cpp/bindings/tests/request_response_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/request_response_unittest.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include <stdint.h>
+#include <utility>
#include "base/message_loop/message_loop.h"
#include "mojo/message_pump/message_pump_mojo.h"
@@ -19,7 +20,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 {
@@ -38,7 +39,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,
@@ -126,7 +127,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();
« no previous file with comments | « mojo/public/cpp/bindings/tests/multiplex_router_unittest.cc ('k') | mojo/public/cpp/bindings/tests/router_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698