summaryrefslogtreecommitdiffstats
path: root/net/http/http_network_session.h
diff options
context:
space:
mode:
authordarin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-06 23:57:07 +0000
committerdarin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-06 23:57:07 +0000
commite1e0626250c6accd6e72168636630ce2aedf4953 (patch)
tree0b6206aac9e8140eba48f6bb1e261926d448f1eb /net/http/http_network_session.h
parent78b02d540d5d4ee753b319b4811842273be9d509 (diff)
downloadchromium_src-e1e0626250c6accd6e72168636630ce2aedf4953.zip
chromium_src-e1e0626250c6accd6e72168636630ce2aedf4953.tar.gz
chromium_src-e1e0626250c6accd6e72168636630ce2aedf4953.tar.bz2
Rename HttpConnection to ClientSocketHandle, and rename HttpConnectionManager to ClientSocketPool.
The max number of sockets per group is now a constructor argument to ClientSocketPool. I also changed the API on the pool to take ClientSocketHandle pointers. The former SocketHandle typedef is now a private ClientSocketPtr typedef for use within the implementation of ClientSocketPool. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@471 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_network_session.h')
-rw-r--r--net/http/http_network_session.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/net/http/http_network_session.h b/net/http/http_network_session.h
index dc31ed1..58cbb2f 100644
--- a/net/http/http_network_session.h
+++ b/net/http/http_network_session.h
@@ -32,7 +32,7 @@
#include "base/ref_counted.h"
#include "net/base/auth_cache.h"
-#include "net/http/http_connection_manager.h"
+#include "net/base/client_socket_pool.h"
#include "net/http/http_proxy_service.h"
namespace net {
@@ -40,19 +40,24 @@ namespace net {
// This class holds session objects used by HttpNetworkTransaction objects.
class HttpNetworkSession : public base::RefCounted<HttpNetworkSession> {
public:
+ // Allow up to 6 connections per host.
+ enum {
+ MAX_SOCKETS_PER_GROUP = 6
+ };
+
HttpNetworkSession(HttpProxyResolver* proxy_resolver)
- : connection_manager_(new HttpConnectionManager()),
+ : connection_pool_(new ClientSocketPool(MAX_SOCKETS_PER_GROUP)),
proxy_resolver_(proxy_resolver),
proxy_service_(proxy_resolver) {
}
AuthCache* auth_cache() { return &auth_cache_; }
- HttpConnectionManager* connection_manager() { return connection_manager_; }
+ ClientSocketPool* connection_pool() { return connection_pool_; }
HttpProxyService* proxy_service() { return &proxy_service_; }
private:
AuthCache auth_cache_;
- scoped_refptr<HttpConnectionManager> connection_manager_;
+ scoped_refptr<ClientSocketPool> connection_pool_;
scoped_ptr<HttpProxyResolver> proxy_resolver_;
HttpProxyService proxy_service_;
};