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