OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ipc/mojo/ipc_mojo_param_traits.h" | 5 #include "ipc/ipc_mojo_param_traits.h" |
6 | 6 |
7 #include "ipc/ipc_message_utils.h" | 7 #include "ipc/ipc_message_utils.h" |
8 #include "ipc/mojo/ipc_mojo_message_helper.h" | 8 #include "ipc/ipc_mojo_message_helper.h" |
9 | 9 |
10 namespace IPC { | 10 namespace IPC { |
11 | 11 |
12 void ParamTraits<mojo::MessagePipeHandle>::Write(Message* m, | 12 void ParamTraits<mojo::MessagePipeHandle>::Write(Message* m, |
13 const param_type& p) { | 13 const param_type& p) { |
14 WriteParam(m, p.is_valid()); | 14 WriteParam(m, p.is_valid()); |
15 if (p.is_valid()) | 15 if (p.is_valid()) |
16 MojoMessageHelper::WriteMessagePipeTo(m, mojo::ScopedMessagePipeHandle(p)); | 16 MojoMessageHelper::WriteMessagePipeTo(m, mojo::ScopedMessagePipeHandle(p)); |
17 } | 17 } |
18 | 18 |
(...skipping 15 matching lines...) Expand all Loading... |
34 } | 34 } |
35 | 35 |
36 void ParamTraits<mojo::MessagePipeHandle>::Log(const param_type& p, | 36 void ParamTraits<mojo::MessagePipeHandle>::Log(const param_type& p, |
37 std::string* l) { | 37 std::string* l) { |
38 l->append("mojo::MessagePipeHandle("); | 38 l->append("mojo::MessagePipeHandle("); |
39 LogParam(p.value(), l); | 39 LogParam(p.value(), l); |
40 l->append(")"); | 40 l->append(")"); |
41 } | 41 } |
42 | 42 |
43 } // namespace IPC | 43 } // namespace IPC |
OLD | NEW |