| 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 // 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 enum DefaultMaxValues { kDefaultMaxSocketsPerProxyServer = 32 }; | 43 enum DefaultMaxValues { kDefaultMaxSocketsPerProxyServer = 32 }; |
| 44 | 44 |
| 45 class NET_EXPORT_PRIVATE ClientSocketPoolManager { | 45 class NET_EXPORT_PRIVATE ClientSocketPoolManager { |
| 46 public: | 46 public: |
| 47 enum SocketGroupType { | 47 enum SocketGroupType { |
| 48 SSL_GROUP, // For all TLS sockets. | 48 SSL_GROUP, // For all TLS sockets. |
| 49 NORMAL_GROUP, // For normal HTTP sockets. | 49 NORMAL_GROUP, // For normal HTTP sockets. |
| 50 FTP_GROUP // For FTP sockets (over an HTTP proxy). | 50 FTP_GROUP // For FTP sockets (over an HTTP proxy). |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 // Returns the correct socket group type for |scheme|. | |
| 54 static SocketGroupType GroupTypeFromScheme(const std::string& scheme); | |
| 55 | |
| 56 ClientSocketPoolManager(); | 53 ClientSocketPoolManager(); |
| 57 virtual ~ClientSocketPoolManager(); | 54 virtual ~ClientSocketPoolManager(); |
| 58 | 55 |
| 59 // The setter methods below affect only newly created socket pools after the | 56 // The setter methods below affect only newly created socket pools after the |
| 60 // methods are called. Normally they should be called at program startup | 57 // methods are called. Normally they should be called at program startup |
| 61 // before any ClientSocketPoolManagerImpl is created. | 58 // before any ClientSocketPoolManagerImpl is created. |
| 62 static int max_sockets_per_pool(HttpNetworkSession::SocketPoolType pool_type); | 59 static int max_sockets_per_pool(HttpNetworkSession::SocketPoolType pool_type); |
| 63 static void set_max_sockets_per_pool( | 60 static void set_max_sockets_per_pool( |
| 64 HttpNetworkSession::SocketPoolType pool_type, | 61 HttpNetworkSession::SocketPoolType pool_type, |
| 65 int socket_count); | 62 int socket_count); |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 bool want_spdy_over_npn, | 189 bool want_spdy_over_npn, |
| 193 const SSLConfig& ssl_config_for_origin, | 190 const SSLConfig& ssl_config_for_origin, |
| 194 const SSLConfig& ssl_config_for_proxy, | 191 const SSLConfig& ssl_config_for_proxy, |
| 195 PrivacyMode privacy_mode, | 192 PrivacyMode privacy_mode, |
| 196 const BoundNetLog& net_log, | 193 const BoundNetLog& net_log, |
| 197 int num_preconnect_streams); | 194 int num_preconnect_streams); |
| 198 | 195 |
| 199 } // namespace net | 196 } // namespace net |
| 200 | 197 |
| 201 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_H_ | 198 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_H_ |
| OLD | NEW |