Index: base/sync_socket_posix.cc |
diff --git a/base/sync_socket_posix.cc b/base/sync_socket_posix.cc |
index 93a01d1b1c20699e134136c47d403f26837c9f44..710653a551e8ec102248f0b052a71efabb142838 100644 |
--- a/base/sync_socket_posix.cc |
+++ b/base/sync_socket_posix.cc |
@@ -96,6 +96,21 @@ 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; |
tommi (sloooow) - chröme
2014/09/04 11:34:10
use C++ style casts
burnik
2014/09/06 18:17:09
Done. And casting removed.
|
+} |
+ |
+bool SyncSocket::PrepareTransitDescriptor( |
+ ProcessHandle peer_process_handle, |
+ SyncSocket::TransitDescriptor* descriptor) { |
+ // |TransitDescriptor| on POSIX is a |FileDescriptor|. |
henrika (OOO until Aug 14)
2014/09/02 07:46:06
Not clear what this comment provides. The type Fil
burnik
2014/09/02 10:02:54
TransitDescriptor is a platform dependent type.
ty
henrika (OOO until Aug 14)
2014/09/02 10:26:38
It does look odd to emphasize a member which is no
burnik
2014/09/02 15:01:34
Suggestions?
On 2014/09/02 10:26:38, henrika wrote
tommi (sloooow) - chröme
2014/09/04 11:34:10
Perhaps it would be more explicit to simply say he
burnik
2014/09/06 18:17:09
I've removed this comment alltogether.
On 2014/09/
|
+ descriptor->fd = handle(); |
+ descriptor->auto_close = false; |
henrika (OOO until Aug 14)
2014/09/02 07:46:06
Is this a new behavior or was it false before as w
burnik
2014/09/02 10:02:54
In all uses it was done this way.
See lefts on:
-
|
+ return (descriptor->fd != -1); |
tommi (sloooow) - chröme
2014/09/04 11:34:10
nit: no need for ()
burnik
2014/09/06 18:17:09
Done.
|
+} |
+ |
bool SyncSocket::Close() { |
const bool retval = CloseHandle(handle_); |
handle_ = kInvalidHandle; |