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 <sys/socket.h> | 10 #include <sys/socket.h> |
(...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
948 } | 948 } |
949 break; | 949 break; |
950 #endif | 950 #endif |
951 } | 951 } |
952 } | 952 } |
953 | 953 |
954 base::ProcessId ChannelPosix::GetSenderPID() { | 954 base::ProcessId ChannelPosix::GetSenderPID() { |
955 return GetPeerPID(); | 955 return GetPeerPID(); |
956 } | 956 } |
957 | 957 |
| 958 bool ChannelPosix::IsAttachmentBrokerEndpoint() { |
| 959 return is_attachment_broker_endpoint(); |
| 960 } |
| 961 |
958 void ChannelPosix::Close() { | 962 void ChannelPosix::Close() { |
959 // Close can be called multiple time, so we need to make sure we're | 963 // Close can be called multiple time, so we need to make sure we're |
960 // idempotent. | 964 // idempotent. |
961 | 965 |
962 ResetToAcceptingConnectionState(); | 966 ResetToAcceptingConnectionState(); |
963 | 967 |
964 if (must_unlink_) { | 968 if (must_unlink_) { |
965 unlink(pipe_name_.c_str()); | 969 unlink(pipe_name_.c_str()); |
966 must_unlink_ = false; | 970 must_unlink_ = false; |
967 } | 971 } |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1037 } | 1041 } |
1038 | 1042 |
1039 #if defined(OS_LINUX) | 1043 #if defined(OS_LINUX) |
1040 // static | 1044 // static |
1041 void Channel::SetGlobalPid(int pid) { | 1045 void Channel::SetGlobalPid(int pid) { |
1042 ChannelPosix::SetGlobalPid(pid); | 1046 ChannelPosix::SetGlobalPid(pid); |
1043 } | 1047 } |
1044 #endif // OS_LINUX | 1048 #endif // OS_LINUX |
1045 | 1049 |
1046 } // namespace IPC | 1050 } // namespace IPC |
OLD | NEW |