| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // ClientSocketPoolManager manages access to all ClientSocketPools. It's a | 5 // ClientSocketPoolManager manages access to all ClientSocketPools. It's a |
| 6 // simple container for all of them. Most importantly, it handles the lifetime | 6 // simple container for all of them. Most importantly, it handles the lifetime |
| 7 // and destruction order properly. | 7 // and destruction order properly. |
| 8 | 8 |
| 9 #ifndef NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_H_ | 9 #ifndef NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_H_ |
| 10 #define NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_H_ | 10 #define NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_H_ |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 | 106 |
| 107 HttpProxyClientSocketPool* GetSocketPoolForHTTPProxy( | 107 HttpProxyClientSocketPool* GetSocketPoolForHTTPProxy( |
| 108 const HostPortPair& http_proxy); | 108 const HostPortPair& http_proxy); |
| 109 | 109 |
| 110 SSLClientSocketPool* GetSocketPoolForSSLWithProxy( | 110 SSLClientSocketPool* GetSocketPoolForSSLWithProxy( |
| 111 const HostPortPair& proxy_server); | 111 const HostPortPair& proxy_server); |
| 112 | 112 |
| 113 // The setter methods below affect only newly created socket pools after the | 113 // The setter methods below affect only newly created socket pools after the |
| 114 // methods are called. Normally they should be called at program startup | 114 // methods are called. Normally they should be called at program startup |
| 115 // before any ClientSocketPoolManager is created. | 115 // before any ClientSocketPoolManager is created. |
| 116 static int max_sockets_per_pool(); |
| 116 NET_EXPORT static void set_max_sockets_per_pool(int socket_count); | 117 NET_EXPORT static void set_max_sockets_per_pool(int socket_count); |
| 117 NET_EXPORT static int max_sockets_per_group(); | 118 NET_EXPORT static int max_sockets_per_group(); |
| 118 NET_EXPORT static void set_max_sockets_per_group(int socket_count); | 119 NET_EXPORT static void set_max_sockets_per_group(int socket_count); |
| 120 static int max_sockets_per_proxy_server(); |
| 119 NET_EXPORT static void set_max_sockets_per_proxy_server(int socket_count); | 121 NET_EXPORT static void set_max_sockets_per_proxy_server(int socket_count); |
| 120 | 122 |
| 121 // A helper method that uses the passed in proxy information to initialize a | 123 // A helper method that uses the passed in proxy information to initialize a |
| 122 // ClientSocketHandle with the relevant socket pool. Use this method for | 124 // ClientSocketHandle with the relevant socket pool. Use this method for |
| 123 // HTTP/HTTPS requests. |ssl_config_for_origin| is only used if the request | 125 // HTTP/HTTPS requests. |ssl_config_for_origin| is only used if the request |
| 124 // uses SSL and |ssl_config_for_proxy| is used if the proxy server is HTTPS. | 126 // uses SSL and |ssl_config_for_proxy| is used if the proxy server is HTTPS. |
| 125 static int InitSocketHandleForHttpRequest( | 127 static int InitSocketHandleForHttpRequest( |
| 126 const GURL& request_url, | 128 const GURL& request_url, |
| 127 const HttpRequestHeaders& request_extra_headers, | 129 const HttpRequestHeaders& request_extra_headers, |
| 128 int request_load_flags, | 130 int request_load_flags, |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 | 228 |
| 227 ClientSocketPoolHistograms ssl_socket_pool_for_proxies_histograms_; | 229 ClientSocketPoolHistograms ssl_socket_pool_for_proxies_histograms_; |
| 228 SSLSocketPoolMap ssl_socket_pools_for_proxies_; | 230 SSLSocketPoolMap ssl_socket_pools_for_proxies_; |
| 229 | 231 |
| 230 DISALLOW_COPY_AND_ASSIGN(ClientSocketPoolManager); | 232 DISALLOW_COPY_AND_ASSIGN(ClientSocketPoolManager); |
| 231 }; | 233 }; |
| 232 | 234 |
| 233 } // namespace net | 235 } // namespace net |
| 234 | 236 |
| 235 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_H_ | 237 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_H_ |
| OLD | NEW |