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

Unified Diff: mojo/public/cpp/bindings/lib/pipe_control_message_proxy.cc

Issue 1955123003: Mojo C++ bindings: switch the remaining callsites of the old serialization interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@24_union_and_others
Patch Set: Created 4 years, 7 months 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 21a4d5ed7c963dcbd2d9eb341a2b5b350055eb33..492bc02d85a133eddd5be08aa8fa81bbea821277 100644
--- a/mojo/public/cpp/bindings/lib/pipe_control_message_proxy.cc
+++ b/mojo/public/cpp/bindings/lib/pipe_control_message_proxy.cc
@@ -9,6 +9,7 @@
#include "base/compiler_specific.h"
#include "mojo/public/cpp/bindings/lib/message_builder.h"
+#include "mojo/public/cpp/bindings/lib/serialization.h"
#include "mojo/public/cpp/bindings/message.h"
#include "mojo/public/interfaces/bindings/pipe_control_messages.mojom.h"
@@ -17,16 +18,20 @@ namespace internal {
namespace {
void SendRunOrClosePipeMessage(MessageReceiver* receiver,
- pipe_control::RunOrClosePipeInputPtr input) {
+ pipe_control::RunOrClosePipeInputPtr input,
+ SerializationContext* context) {
pipe_control::RunOrClosePipeMessageParamsPtr params_ptr(
pipe_control::RunOrClosePipeMessageParams::New());
params_ptr->input = std::move(input);
- size_t size = GetSerializedSize_(params_ptr, nullptr);
+ size_t size =
+ PrepareToSerialize<pipe_control::RunOrClosePipeMessageParamsPtr>(
+ params_ptr, context);
MessageBuilder builder(pipe_control::kRunOrClosePipeMessageId, size);
pipe_control::internal::RunOrClosePipeMessageParams_Data* params = nullptr;
- Serialize_(std::move(params_ptr), builder.buffer(), &params, nullptr);
+ Serialize<pipe_control::RunOrClosePipeMessageParamsPtr>(
+ params_ptr, builder.buffer(), &params, context);
params->EncodePointers();
builder.message()->set_interface_id(kInvalidInterfaceId);
bool ok = receiver->Accept(builder.message());
@@ -49,7 +54,7 @@ void PipeControlMessageProxy::NotifyPeerEndpointClosed(InterfaceId id) {
pipe_control::RunOrClosePipeInput::New());
input->set_peer_associated_endpoint_closed_event(std::move(event));
- SendRunOrClosePipeMessage(receiver_, std::move(input));
+ SendRunOrClosePipeMessage(receiver_, std::move(input), &context_);
}
void PipeControlMessageProxy::NotifyEndpointClosedBeforeSent(InterfaceId id) {
@@ -61,7 +66,7 @@ void PipeControlMessageProxy::NotifyEndpointClosedBeforeSent(InterfaceId id) {
pipe_control::RunOrClosePipeInput::New());
input->set_associated_endpoint_closed_before_sent_event(std::move(event));
- SendRunOrClosePipeMessage(receiver_, std::move(input));
+ SendRunOrClosePipeMessage(receiver_, std::move(input), &context_);
}
} // namespace internal
« no previous file with comments | « mojo/public/cpp/bindings/lib/pipe_control_message_proxy.h ('k') | mojo/public/cpp/bindings/lib/serialization_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698