| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_POOL_H_ | 5 #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_POOL_H_ |
| 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_POOL_H_ | 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_POOL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 bool CanProceed(SSLClientSocket* ssl_socket); | 127 bool CanProceed(SSLClientSocket* ssl_socket); |
| 128 | 128 |
| 129 // Configures the SSLConnectJobMessenger to begin monitoring |ssl_socket|'s | 129 // Configures the SSLConnectJobMessenger to begin monitoring |ssl_socket|'s |
| 130 // connection status. After a successful connection, or an error, | 130 // connection status. After a successful connection, or an error, |
| 131 // the messenger will determine which sockets that have been added | 131 // the messenger will determine which sockets that have been added |
| 132 // via AddPendingSocket() to allow to proceed. | 132 // via AddPendingSocket() to allow to proceed. |
| 133 void MonitorConnectionResult(SSLClientSocket* ssl_socket); | 133 void MonitorConnectionResult(SSLClientSocket* ssl_socket); |
| 134 | 134 |
| 135 // Adds |socket| to the list of sockets waiting to Connect(). When | 135 // Adds |socket| to the list of sockets waiting to Connect(). When |
| 136 // the messenger has determined that it's an appropriate time for |socket| | 136 // the messenger has determined that it's an appropriate time for |socket| |
| 137 // to connect, it will asynchronously invoke |callback|. | 137 // to connect, it will invoke |callback|. |
| 138 // | 138 // |
| 139 // Note: It is an error to call AddPendingSocket() without having first | 139 // Note: It is an error to call AddPendingSocket() without having first |
| 140 // called MonitorConnectionResult() and configuring a socket that WILL | 140 // called MonitorConnectionResult() and configuring a socket that WILL |
| 141 // have Connect() called on it. | 141 // have Connect() called on it. |
| 142 void AddPendingSocket(SSLClientSocket* ssl_socket, | 142 void AddPendingSocket(SSLClientSocket* ssl_socket, |
| 143 const base::Closure& callback); | 143 const base::Closure& callback); |
| 144 | 144 |
| 145 private: | 145 private: |
| 146 // Processes pending callbacks when a socket completes its SSL handshake -- | 146 // Processes pending callbacks when a socket completes its SSL handshake -- |
| 147 // either successfully or unsuccessfully. | 147 // either successfully or unsuccessfully. |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 HttpProxyClientSocketPool* const http_proxy_pool_; | 387 HttpProxyClientSocketPool* const http_proxy_pool_; |
| 388 PoolBase base_; | 388 PoolBase base_; |
| 389 const scoped_refptr<SSLConfigService> ssl_config_service_; | 389 const scoped_refptr<SSLConfigService> ssl_config_service_; |
| 390 | 390 |
| 391 DISALLOW_COPY_AND_ASSIGN(SSLClientSocketPool); | 391 DISALLOW_COPY_AND_ASSIGN(SSLClientSocketPool); |
| 392 }; | 392 }; |
| 393 | 393 |
| 394 } // namespace net | 394 } // namespace net |
| 395 | 395 |
| 396 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_POOL_H_ | 396 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_POOL_H_ |
| OLD | NEW |