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

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: 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/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 bcd5cfaf27148205c56e9fcdae10c5c65cb9b6cb..0ac570c08bec69953e9ea386a1687300f5900b7f 100644
--- a/mojo/public/cpp/bindings/lib/pipe_control_message_proxy.cc
+++ b/mojo/public/cpp/bindings/lib/pipe_control_message_proxy.cc
@@ -4,6 +4,8 @@
#include "mojo/public/cpp/bindings/lib/pipe_control_message_proxy.h"
+#include <utility>
+
#include "base/compiler_specific.h"
#include "mojo/public/cpp/bindings/lib/message_builder.h"
#include "mojo/public/cpp/bindings/message.h"
@@ -17,13 +19,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());
@@ -44,9 +46,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) {
@@ -56,9 +58,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

Powered by Google App Engine
This is Rietveld 408576698