OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 return false; | 462 return false; |
463 } | 463 } |
464 } | 464 } |
465 #endif // IPC_USES_READWRITE | 465 #endif // IPC_USES_READWRITE |
466 | 466 |
467 return true; | 467 return true; |
468 } | 468 } |
469 | 469 |
470 bool Channel::ChannelImpl::Connect() { | 470 bool Channel::ChannelImpl::Connect() { |
471 if (server_listen_pipe_ == -1 && pipe_ == -1) { | 471 if (server_listen_pipe_ == -1 && pipe_ == -1) { |
472 NOTREACHED() << "Must call create on a channel before calling connect"; | 472 DLOG(INFO) << "Must call create on a channel before calling connect"; |
473 return false; | 473 return false; |
474 } | 474 } |
475 | 475 |
476 bool did_connect = true; | 476 bool did_connect = true; |
477 if (server_listen_pipe_ != -1) { | 477 if (server_listen_pipe_ != -1) { |
478 // Watch the pipe for connections, and turn any connections into | 478 // Watch the pipe for connections, and turn any connections into |
479 // active sockets. | 479 // active sockets. |
480 MessageLoopForIO::current()->WatchFileDescriptor( | 480 MessageLoopForIO::current()->WatchFileDescriptor( |
481 server_listen_pipe_, | 481 server_listen_pipe_, |
482 true, | 482 true, |
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1157 | 1157 |
1158 bool Channel::HasAcceptedConnection() const { | 1158 bool Channel::HasAcceptedConnection() const { |
1159 return channel_impl_->HasAcceptedConnection(); | 1159 return channel_impl_->HasAcceptedConnection(); |
1160 } | 1160 } |
1161 | 1161 |
1162 void Channel::ResetToAcceptingConnectionState() { | 1162 void Channel::ResetToAcceptingConnectionState() { |
1163 channel_impl_->ResetToAcceptingConnectionState(); | 1163 channel_impl_->ResetToAcceptingConnectionState(); |
1164 } | 1164 } |
1165 | 1165 |
1166 } // namespace IPC | 1166 } // namespace IPC |
OLD | NEW |