OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_nacl.h" | 5 #include "ipc/ipc_channel_nacl.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 #include <sys/types.h> | 10 #include <sys/types.h> |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 CleanUp(); | 143 CleanUp(); |
144 Close(); | 144 Close(); |
145 } | 145 } |
146 | 146 |
147 base::ProcessId ChannelNacl::GetPeerPID() const { | 147 base::ProcessId ChannelNacl::GetPeerPID() const { |
148 // This shouldn't actually get used in the untrusted side of the proxy, and we | 148 // This shouldn't actually get used in the untrusted side of the proxy, and we |
149 // don't have the real pid anyway. | 149 // don't have the real pid anyway. |
150 return -1; | 150 return -1; |
151 } | 151 } |
152 | 152 |
153 base::ProcessId ChannelNacl::GetSelfPID() const { | |
154 return -1; | |
155 } | |
156 | |
157 bool ChannelNacl::Connect() { | 153 bool ChannelNacl::Connect() { |
158 WillConnect(); | 154 WillConnect(); |
159 | 155 |
160 if (pipe_ == -1) { | 156 if (pipe_ == -1) { |
161 DLOG(WARNING) << "Channel creation failed: " << pipe_name_; | 157 DLOG(WARNING) << "Channel creation failed: " << pipe_name_; |
162 return false; | 158 return false; |
163 } | 159 } |
164 | 160 |
165 // Note that Connect is called on the "Channel" thread (i.e., the same thread | 161 // Note that Connect is called on the "Channel" thread (i.e., the same thread |
166 // where Channel::Send will be called, and the same thread that should receive | 162 // where Channel::Send will be called, and the same thread that should receive |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 | 388 |
393 // static | 389 // static |
394 std::unique_ptr<Channel> Channel::Create( | 390 std::unique_ptr<Channel> Channel::Create( |
395 const IPC::ChannelHandle& channel_handle, | 391 const IPC::ChannelHandle& channel_handle, |
396 Mode mode, | 392 Mode mode, |
397 Listener* listener) { | 393 Listener* listener) { |
398 return base::WrapUnique(new ChannelNacl(channel_handle, mode, listener)); | 394 return base::WrapUnique(new ChannelNacl(channel_handle, mode, listener)); |
399 } | 395 } |
400 | 396 |
401 } // namespace IPC | 397 } // namespace IPC |
OLD | NEW |