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 <sys/types.h> | 9 #include <sys/types.h> |
10 | 10 |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 // When the input data buffer is empty, the fds should be too. | 372 // When the input data buffer is empty, the fds should be too. |
373 return input_fds_.empty(); | 373 return input_fds_.empty(); |
374 } | 374 } |
375 | 375 |
376 void ChannelNacl::HandleInternalMessage(const Message& msg) { | 376 void ChannelNacl::HandleInternalMessage(const Message& msg) { |
377 // The trusted side IPC::Channel should handle the "hello" handshake; we | 377 // The trusted side IPC::Channel should handle the "hello" handshake; we |
378 // should not receive the "Hello" message. | 378 // should not receive the "Hello" message. |
379 NOTREACHED(); | 379 NOTREACHED(); |
380 } | 380 } |
381 | 381 |
| 382 base::ProcessId ChannelNacl::GetSenderPID() { |
| 383 // The untrusted side of the IPC::Channel should never have to worry about |
| 384 // sender's process id. |
| 385 return base::kNullProcessId; |
| 386 } |
| 387 |
382 // Channel's methods | 388 // Channel's methods |
383 | 389 |
384 // static | 390 // static |
385 scoped_ptr<Channel> Channel::Create(const IPC::ChannelHandle& channel_handle, | 391 scoped_ptr<Channel> Channel::Create(const IPC::ChannelHandle& channel_handle, |
386 Mode mode, | 392 Mode mode, |
387 Listener* listener, | 393 Listener* listener, |
388 AttachmentBroker* broker) { | 394 AttachmentBroker* broker) { |
389 return scoped_ptr<Channel>( | 395 return scoped_ptr<Channel>( |
390 new ChannelNacl(channel_handle, mode, listener, broker)); | 396 new ChannelNacl(channel_handle, mode, listener, broker)); |
391 } | 397 } |
392 | 398 |
393 } // namespace IPC | 399 } // namespace IPC |
OLD | NEW |