OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/ipc_channel.h" | 5 #include "ipc/ipc_channel.h" |
6 | 6 |
7 namespace IPC { | 7 namespace IPC { |
8 | 8 |
| 9 static Channel::MessageVerifier g_message_verifier = nullptr; |
| 10 |
9 // static | 11 // static |
10 scoped_ptr<Channel> Channel::CreateClient( | 12 scoped_ptr<Channel> Channel::CreateClient( |
11 const IPC::ChannelHandle& channel_handle, | 13 const IPC::ChannelHandle& channel_handle, |
12 Listener* listener, | 14 Listener* listener, |
13 AttachmentBroker* broker) { | 15 AttachmentBroker* broker) { |
14 return Channel::Create(channel_handle, Channel::MODE_CLIENT, listener, | 16 return Channel::Create(channel_handle, Channel::MODE_CLIENT, listener, |
15 broker); | 17 broker); |
16 } | 18 } |
17 | 19 |
18 // static | 20 // static |
(...skipping 30 matching lines...) Expand all Loading... |
49 const IPC::ChannelHandle& channel_handle, | 51 const IPC::ChannelHandle& channel_handle, |
50 Listener* listener, | 52 Listener* listener, |
51 AttachmentBroker* broker) { | 53 AttachmentBroker* broker) { |
52 return Channel::Create(channel_handle, Channel::MODE_SERVER, listener, | 54 return Channel::Create(channel_handle, Channel::MODE_SERVER, listener, |
53 broker); | 55 broker); |
54 } | 56 } |
55 | 57 |
56 Channel::~Channel() { | 58 Channel::~Channel() { |
57 } | 59 } |
58 | 60 |
| 61 // static |
| 62 void Channel::SetMessageVerifier(MessageVerifier verifier) { |
| 63 g_message_verifier = verifier; |
| 64 } |
| 65 |
| 66 // static |
| 67 Channel::MessageVerifier Channel::GetMessageVerifier() { |
| 68 return g_message_verifier; |
| 69 } |
| 70 |
59 bool Channel::IsSendThreadSafe() const { | 71 bool Channel::IsSendThreadSafe() const { |
60 return false; | 72 return false; |
61 } | 73 } |
62 | 74 |
63 } // namespace IPC | 75 } // namespace IPC |
64 | 76 |
OLD | NEW |