Chromium Code Reviews| Index: net/socket/unix_domain_server_socket_posix.h |
| diff --git a/net/socket/unix_domain_server_socket_posix.h b/net/socket/unix_domain_server_socket_posix.h |
| index 85c743d2b8fcc6613afba713cec729687c13eb42..8b8dac253e7fbd9e15da163ec214630d625d19db 100644 |
| --- a/net/socket/unix_domain_server_socket_posix.h |
| +++ b/net/socket/unix_domain_server_socket_posix.h |
| @@ -59,11 +59,23 @@ class NET_EXPORT UnixDomainServerSocket : public ServerSocket { |
| virtual int Accept(scoped_ptr<StreamSocket>* socket, |
| const CompletionCallback& callback) OVERRIDE; |
| + // Accept an incoming connection on |listen_socket_|, but pass back |
|
byungchul
2014/08/27 23:35:51
s/Accept/Accepts, s/pass/passes
Chris Masone
2014/08/28 17:53:16
Done.
|
| + // a raw SocketDescriptor instead of a a StreamSocket. |
|
byungchul
2014/08/27 23:35:51
s/a a/a
Chris Masone
2014/08/28 17:53:16
Done.
|
| + int AcceptSocketDescriptor(SocketDescriptor* socket_descriptor, |
| + const CompletionCallback& callback); |
| + |
| private: |
| - void AcceptCompleted(scoped_ptr<StreamSocket>* socket, |
| + // A callback to wrap the setting of the out-parameter to Accept(). |
| + // This allows the internal machinery of that call to be implemented in |
| + // a manner that's agnostic to the caller's desired output. |
| + typedef base::Callback<void(scoped_ptr<SocketLibevent>)> SetterCallback; |
| + |
| + int DoAccept(const SetterCallback& setter_callback, |
| + const CompletionCallback& callback); |
| + void AcceptCompleted(const SetterCallback& setter_callback, |
| const CompletionCallback& callback, |
| int rv); |
| - bool AuthenticateAndGetStreamSocket(scoped_ptr<StreamSocket>* socket); |
| + bool AuthenticateAndGetStreamSocket(const SetterCallback& setter_callback); |
| scoped_ptr<SocketLibevent> listen_socket_; |
| const AuthCallback auth_callback_; |