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/types.h> | 10 #include <sys/types.h> |
(...skipping 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1119 | 1119 |
1120 Channel::~Channel() { | 1120 Channel::~Channel() { |
1121 delete channel_impl_; | 1121 delete channel_impl_; |
1122 } | 1122 } |
1123 | 1123 |
1124 bool Channel::Connect() { | 1124 bool Channel::Connect() { |
1125 return channel_impl_->Connect(); | 1125 return channel_impl_->Connect(); |
1126 } | 1126 } |
1127 | 1127 |
1128 void Channel::Close() { | 1128 void Channel::Close() { |
1129 channel_impl_->Close(); | 1129 if (channel_impl_) |
| 1130 channel_impl_->Close(); |
1130 } | 1131 } |
1131 | 1132 |
1132 void Channel::set_listener(Listener* listener) { | 1133 void Channel::set_listener(Listener* listener) { |
1133 channel_impl_->set_listener(listener); | 1134 channel_impl_->set_listener(listener); |
1134 } | 1135 } |
1135 | 1136 |
1136 base::ProcessId Channel::peer_pid() const { | 1137 base::ProcessId Channel::peer_pid() const { |
1137 return channel_impl_->peer_pid(); | 1138 return channel_impl_->peer_pid(); |
1138 } | 1139 } |
1139 | 1140 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1184 | 1185 |
1185 | 1186 |
1186 #if defined(OS_LINUX) | 1187 #if defined(OS_LINUX) |
1187 // static | 1188 // static |
1188 void Channel::SetGlobalPid(int pid) { | 1189 void Channel::SetGlobalPid(int pid) { |
1189 ChannelImpl::SetGlobalPid(pid); | 1190 ChannelImpl::SetGlobalPid(pid); |
1190 } | 1191 } |
1191 #endif // OS_LINUX | 1192 #endif // OS_LINUX |
1192 | 1193 |
1193 } // namespace IPC | 1194 } // namespace IPC |
OLD | NEW |