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

Unified Diff: mojo/public/cpp/bindings/lib/pipe_control_message_proxy.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
« no previous file with comments | « mojo/public/cpp/bindings/lib/multiplex_router.cc ('k') | mojo/public/cpp/bindings/lib/router.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/lib/pipe_control_message_proxy.cc
diff --git a/mojo/public/cpp/bindings/lib/pipe_control_message_proxy.cc b/mojo/public/cpp/bindings/lib/pipe_control_message_proxy.cc
index c7fa4ffe88cc7e6afe913d0bf1b2b2e94a5a556b..cfc6702bfc3da468e048ebdf3944c7077affe674 100644
--- a/mojo/public/cpp/bindings/lib/pipe_control_message_proxy.cc
+++ b/mojo/public/cpp/bindings/lib/pipe_control_message_proxy.cc
@@ -5,6 +5,7 @@
#include "mojo/public/cpp/bindings/lib/pipe_control_message_proxy.h"
#include <stddef.h>
+#include <utility>
#include "base/compiler_specific.h"
#include "mojo/public/cpp/bindings/lib/message_builder.h"
@@ -19,13 +20,13 @@ void SendRunOrClosePipeMessage(MessageReceiver* receiver,
pipe_control::RunOrClosePipeInputPtr input) {
pipe_control::RunOrClosePipeMessageParamsPtr params_ptr(
pipe_control::RunOrClosePipeMessageParams::New());
- params_ptr->input = input.Pass();
+ params_ptr->input = std::move(input);
size_t size = GetSerializedSize_(params_ptr);
MessageBuilder builder(pipe_control::kRunOrClosePipeMessageId, size);
pipe_control::internal::RunOrClosePipeMessageParams_Data* params = nullptr;
- Serialize_(params_ptr.Pass(), builder.buffer(), &params);
+ Serialize_(std::move(params_ptr), builder.buffer(), &params);
params->EncodePointersAndHandles(builder.message()->mutable_handles());
builder.message()->set_interface_id(kInvalidInterfaceId);
bool ok = receiver->Accept(builder.message());
@@ -46,9 +47,9 @@ void PipeControlMessageProxy::NotifyPeerEndpointClosed(InterfaceId id) {
pipe_control::RunOrClosePipeInputPtr input(
pipe_control::RunOrClosePipeInput::New());
- input->set_peer_associated_endpoint_closed_event(event.Pass());
+ input->set_peer_associated_endpoint_closed_event(std::move(event));
- SendRunOrClosePipeMessage(receiver_, input.Pass());
+ SendRunOrClosePipeMessage(receiver_, std::move(input));
}
void PipeControlMessageProxy::NotifyEndpointClosedBeforeSent(InterfaceId id) {
@@ -58,9 +59,9 @@ void PipeControlMessageProxy::NotifyEndpointClosedBeforeSent(InterfaceId id) {
pipe_control::RunOrClosePipeInputPtr input(
pipe_control::RunOrClosePipeInput::New());
- input->set_associated_endpoint_closed_before_sent_event(event.Pass());
+ input->set_associated_endpoint_closed_before_sent_event(std::move(event));
- SendRunOrClosePipeMessage(receiver_, input.Pass());
+ SendRunOrClosePipeMessage(receiver_, std::move(input));
}
} // namespace internal
« no previous file with comments | « mojo/public/cpp/bindings/lib/multiplex_router.cc ('k') | mojo/public/cpp/bindings/lib/router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698