Chromium Code Reviews| Index: base/sync_socket_win.cc |
| diff --git a/base/sync_socket_win.cc b/base/sync_socket_win.cc |
| index 26e76ec2738e6629fbf4b0c41cc61ac0b7e7d6ec..1d89fcca5c7cba12f697c2d31c6904aaa34a5d92 100644 |
| --- a/base/sync_socket_win.cc |
| +++ b/base/sync_socket_win.cc |
| @@ -207,6 +207,21 @@ bool SyncSocket::CreatePair(SyncSocket* socket_a, SyncSocket* socket_b) { |
| return CreatePairImpl(&socket_a->handle_, &socket_b->handle_, false); |
| } |
| +// static |
| +SyncSocket::Handle SyncSocket::UnwrapHandle( |
| + const SyncSocket::TransitDescriptor& descriptor) { |
| + return (SyncSocket::Handle) descriptor; |
|
no longer working on chromium
2014/09/01 14:56:18
ditto
burnik
2014/09/01 15:08:02
Done.
|
| +} |
| + |
| +bool SyncSocket::PrepareTransitDescriptor(ProcessHandle peer_process_handle, |
| + SyncSocket::TransitDescriptor * descriptor) { |
|
no longer working on chromium
2014/09/01 14:56:18
ditto
burnik
2014/09/01 14:59:34
Also TransitDescriptor*
Done.
burnik
2014/09/01 15:08:03
Done.
|
| + // |TransitDescriptor| on Windows is the |Handle| itself |
| + ::DuplicateHandle(GetCurrentProcess(), handle(), |
| + peer_process_handle, descriptor, |
| + 0, FALSE, DUPLICATE_SAME_ACCESS); |
| + return (*descriptor != 0); |
| +} |
| + |
| bool SyncSocket::Close() { |
| if (handle_ == kInvalidHandle) |
| return true; |