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_posix.h" | 5 #include "ipc/ipc_channel_posix.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <fcntl.h> | 8 #include <fcntl.h> |
9 #include <stddef.h> | 9 #include <stddef.h> |
10 #include <stdint.h> | 10 #include <stdint.h> |
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
691 } | 691 } |
692 } | 692 } |
693 | 693 |
694 bool ChannelPosix::ProcessMessageForDelivery(Message* message) { | 694 bool ChannelPosix::ProcessMessageForDelivery(Message* message) { |
695 // Sending a brokerable attachment requires a call to Channel::Send(), so | 695 // Sending a brokerable attachment requires a call to Channel::Send(), so |
696 // Send() may be re-entrant. Brokered attachments must be sent before the | 696 // Send() may be re-entrant. Brokered attachments must be sent before the |
697 // Message itself. | 697 // Message itself. |
698 if (message->HasBrokerableAttachments()) { | 698 if (message->HasBrokerableAttachments()) { |
699 DCHECK(GetAttachmentBroker()); | 699 DCHECK(GetAttachmentBroker()); |
700 DCHECK(peer_pid_ != base::kNullProcessId); | 700 DCHECK(peer_pid_ != base::kNullProcessId); |
701 for (const BrokerableAttachment* attachment : | 701 for (BrokerableAttachment* attachment : |
702 message->attachment_set()->PeekBrokerableAttachments()) { | 702 message->attachment_set()->GetBrokerableAttachments()) { |
703 if (!GetAttachmentBroker()->SendAttachmentToProcess(attachment, | 703 if (!GetAttachmentBroker()->SendAttachmentToProcess(attachment, |
704 peer_pid_)) { | 704 peer_pid_)) { |
705 delete message; | 705 delete message; |
706 return false; | 706 return false; |
707 } | 707 } |
708 } | 708 } |
709 } | 709 } |
710 | 710 |
711 #ifdef IPC_MESSAGE_LOG_ENABLED | 711 #ifdef IPC_MESSAGE_LOG_ENABLED |
712 Logging::GetInstance()->OnSendMessage(message, ""); | 712 Logging::GetInstance()->OnSendMessage(message, ""); |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1120 } | 1120 } |
1121 | 1121 |
1122 #if defined(OS_LINUX) | 1122 #if defined(OS_LINUX) |
1123 // static | 1123 // static |
1124 void Channel::SetGlobalPid(int pid) { | 1124 void Channel::SetGlobalPid(int pid) { |
1125 ChannelPosix::SetGlobalPid(pid); | 1125 ChannelPosix::SetGlobalPid(pid); |
1126 } | 1126 } |
1127 #endif // OS_LINUX | 1127 #endif // OS_LINUX |
1128 | 1128 |
1129 } // namespace IPC | 1129 } // namespace IPC |
OLD | NEW |