| Index: net/socket/ssl_client_socket_pool.h
|
| diff --git a/net/socket/ssl_client_socket_pool.h b/net/socket/ssl_client_socket_pool.h
|
| index 723cc6019ea2b161182a852565fc77afec5c7381..7d513fa551009669242096dbbc0e2420fdba5be7 100644
|
| --- a/net/socket/ssl_client_socket_pool.h
|
| +++ b/net/socket/ssl_client_socket_pool.h
|
| @@ -116,7 +116,10 @@ class NET_EXPORT_PRIVATE SSLConnectJobMessenger {
|
|
|
| typedef std::vector<SocketAndCallback> SSLPendingSocketsAndCallbacks;
|
|
|
| - // Returns true if |ssl_socket|'s Connect() method should be called.
|
| + SSLConnectJobMessenger();
|
| +
|
| + // Returns true if the given |ssl_socket| should continue its
|
| + // SSL connection.
|
| bool CanProceed(SSLClientSocket* ssl_socket);
|
|
|
| // Configure the SSLConnectJobMessenger to begin monitoring |ssl_socket|'s
|
| @@ -136,18 +139,24 @@ class NET_EXPORT_PRIVATE SSLConnectJobMessenger {
|
| // have Connect() called on it.
|
| void AddPendingSocket(SSLClientSocket* socket, const base::Closure& callback);
|
|
|
| + // Posts a task to process pending callbacks when a socket encounters an error
|
| + // while completing its connection.
|
| + void OnJobFailed();
|
| +
|
| + private:
|
| // Processes pending callbacks when a socket successfully completes
|
| // its connection.
|
| void OnJobSucceeded();
|
|
|
| - // Processes pending callbacks when a socket encounters an error
|
| - // while completing its connection.
|
| - void OnJobFailed();
|
| + // Determines which pending socket should be the next leading connection,
|
| + // and runs that socket's resumption callback.
|
| + void ConnectNewLeader();
|
|
|
| - private:
|
| // Runs all callbacks stored in |pending_sockets_and_callbacks_|.
|
| - void RunAllJobs(std::vector<SocketAndCallback>& pending_socket_and_callbacks);
|
| + void RunAllJobs(
|
| + std::vector<SocketAndCallback>& pending_sockets_and_callbacks);
|
|
|
| + base::WeakPtrFactory<SSLConnectJobMessenger> weak_factory_;
|
| SSLPendingSocketsAndCallbacks pending_sockets_and_callbacks_;
|
| std::vector<SSLClientSocket*> connecting_sockets_;
|
| };
|
|
|