Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Side by Side Diff: net/socket/client_socket_pool_manager.h

Issue 8340012: Close idle connections / SPDY sessions when needed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: OVERRIDE Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698