Chromium Code Reviews| Index: base/sync_socket_posix.cc |
| diff --git a/base/sync_socket_posix.cc b/base/sync_socket_posix.cc |
| index 93a01d1b1c20699e134136c47d403f26837c9f44..807e50abab6fec1267ab1723c0ac68e46034ad37 100644 |
| --- a/base/sync_socket_posix.cc |
| +++ b/base/sync_socket_posix.cc |
| @@ -96,6 +96,20 @@ bool SyncSocket::CreatePair(SyncSocket* socket_a, SyncSocket* socket_b) { |
| return true; |
| } |
| +// static |
| +SyncSocket::Handle SyncSocket::UnwrapHandle( |
| + const SyncSocket::TransitDescriptor& descriptor) { |
| + return (SyncSocket::Handle) descriptor.fd; |
|
no longer working on chromium
2014/09/01 14:56:18
c++ style, use static_cast
burnik
2014/09/02 15:01:34
Done.
|
| +} |
| + |
| +bool SyncSocket::PrepareTransitDescriptor(ProcessHandle peer_process_handle, |
| + SyncSocket::TransitDescriptor * descriptor) { |
|
henrika (OOO until Aug 14)
2014/09/01 14:30:43
remove space
no longer working on chromium
2014/09/01 14:56:18
indentation
burnik
2014/09/01 14:59:34
Done.
|
| + // |TransitDescriptor| on POSIX is a |FileDescriptor| |
|
no longer working on chromium
2014/09/01 14:56:18
period by the end
burnik
2014/09/01 15:08:02
Done.
|
| + descriptor->fd = handle(); |
| + descriptor->auto_close = false; |
| + return (descriptor->fd != -1); |
| +} |
| + |
| bool SyncSocket::Close() { |
| const bool retval = CloseHandle(handle_); |
| handle_ = kInvalidHandle; |