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

Unified Diff: ipc/ipc_mojo_param_traits.cc

Issue 2047233002: Support using a Mojo message pipe in a ChannelHandle. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-handle-attachemnt-public-api
Patch Set: comments Created 4 years, 6 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
« no previous file with comments | « ipc/ipc_mojo_param_traits.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_mojo_param_traits.cc
diff --git a/ipc/ipc_mojo_param_traits.cc b/ipc/ipc_mojo_param_traits.cc
index af79f3b9ae6515ee5a7012be2ff3fb746d00b0fa..189af3511d35260a17b0e18e9d191385931b539c 100644
--- a/ipc/ipc_mojo_param_traits.cc
+++ b/ipc/ipc_mojo_param_traits.cc
@@ -9,14 +9,21 @@
namespace IPC {
-void ParamTraits<mojo::MessagePipeHandle>::Write(Message* m,
+void ParamTraits<mojo::MessagePipeHandle>::GetSize(base::PickleSizer* sizer,
+ const param_type& p) {
+ GetParamSize(sizer, p.is_valid());
+ if (p.is_valid())
+ sizer->AddAttachment();
+}
+
+void ParamTraits<mojo::MessagePipeHandle>::Write(base::Pickle* m,
const param_type& p) {
WriteParam(m, p.is_valid());
if (p.is_valid())
MojoMessageHelper::WriteMessagePipeTo(m, mojo::ScopedMessagePipeHandle(p));
}
-bool ParamTraits<mojo::MessagePipeHandle>::Read(const Message* m,
+bool ParamTraits<mojo::MessagePipeHandle>::Read(const base::Pickle* m,
base::PickleIterator* iter,
param_type* r) {
bool is_valid;
« no previous file with comments | « ipc/ipc_mojo_param_traits.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698