diff options
author | rch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-04 15:52:09 +0000 |
---|---|---|
committer | rch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-04 15:52:09 +0000 |
commit | f9cf5577f3dc6bfb03b411115c7c983211be2f3a (patch) | |
tree | 49d8554a8403ad90f24c975d9c4e9842697dd0c8 /net/spdy/spdy_session_pool.h | |
parent | fb9150c1718be8f34ab9d932a2f5d4a4830e574a (diff) | |
download | chromium_src-f9cf5577f3dc6bfb03b411115c7c983211be2f3a.zip chromium_src-f9cf5577f3dc6bfb03b411115c7c983211be2f3a.tar.gz chromium_src-f9cf5577f3dc6bfb03b411115c7c983211be2f3a.tar.bz2 |
Move a number of static variables SPDY to HttpNetworkSession::Params. Simplifies the creation of HttpNetworkSession::Params in IOThread by creating a method to do just that. Fixes a bug in chrome/browser/profiles/profile_io_data.cc where some of the Globals were not being consulted when the HttpNetworkSession was constructed.
BUG=162571
Review URL: https://chromiumcodereview.appspot.com/11415219
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170967 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_session_pool.h')
-rw-r--r-- | net/spdy/spdy_session_pool.h | 41 |
1 files changed, 25 insertions, 16 deletions
diff --git a/net/spdy/spdy_session_pool.h b/net/spdy/spdy_session_pool.h index ebd9668..b77f28b 100644 --- a/net/spdy/spdy_session_pool.h +++ b/net/spdy/spdy_session_pool.h @@ -21,6 +21,7 @@ #include "net/base/ssl_config_service.h" #include "net/proxy/proxy_config.h" #include "net/proxy/proxy_server.h" +#include "net/socket/next_proto.h" namespace net { @@ -45,9 +46,22 @@ class NET_EXPORT SpdySessionPool public SSLConfigService::Observer, public CertDatabase::Observer { public: + typedef base::TimeTicks (*TimeFunc)(void); + SpdySessionPool(HostResolver* host_resolver, SSLConfigService* ssl_config_service, HttpServerProperties* http_server_properties, + size_t max_sessions_per_domain, + bool force_single_domain, + bool enable_ip_pooling, + bool enable_credential_frames, + bool enable_compression, + bool enable_ping_based_connection_checking, + NextProto default_protocol, + size_t default_initial_recv_window_size, + size_t initial_max_concurrent_streams, + size_t max_concurrent_streams_limit, + SpdySessionPool::TimeFunc time_func, const std::string& trusted_spdy_proxy); virtual ~SpdySessionPool(); @@ -62,12 +76,6 @@ class NET_EXPORT SpdySessionPool const HostPortProxyPair& host_port_proxy_pair, const BoundNetLog& net_log); - // Set the maximum concurrent sessions per domain. - static void set_max_sessions_per_domain(int max) { - if (max >= 1) - g_max_sessions_per_domain = max; - } - // Builds a SpdySession from an existing SSL socket. Users should try // calling Get() first to use an existing SpdySession so we don't get // multiple SpdySessions per domain. Note that ownership of |connection| is @@ -126,13 +134,6 @@ class NET_EXPORT SpdySessionPool // We perform the same flushing as described above when SSL settings change. virtual void OnSSLConfigChanged() OVERRIDE; - // A debugging mode where we compress all accesses through a single domain. - static void ForceSingleDomain() { g_force_single_domain = true; } - - // Controls whether the pool allows use of a common session for domains - // which share IP address resolutions. - static void enable_ip_pooling(bool value) { g_enable_ip_pooling = value; } - // CertDatabase::Observer methods: virtual void OnCertAdded(const X509Certificate* cert) OVERRIDE; virtual void OnCertTrustChanged(const X509Certificate* cert) OVERRIDE; @@ -197,17 +198,25 @@ class NET_EXPORT SpdySessionPool // A map of IPEndPoint aliases for sessions. SpdyAliasMap aliases_; - static size_t g_max_sessions_per_domain; static bool g_force_single_domain; - static bool g_enable_ip_pooling; const scoped_refptr<SSLConfigService> ssl_config_service_; HostResolver* const resolver_; // Defaults to true. May be controlled via SpdySessionPoolPeer for tests. bool verify_domain_authentication_; - bool enable_sending_initial_settings_; + size_t max_sessions_per_domain_; + bool force_single_domain_; + bool enable_ip_pooling_; + bool enable_credential_frames_; + bool enable_compression_; + bool enable_ping_based_connection_checking_; + NextProto default_protocol_; + size_t initial_recv_window_size_; + size_t initial_max_concurrent_streams_; + size_t max_concurrent_streams_limit_; + TimeFunc time_func_; // This SPDY proxy is allowed to push resources from origins that are // different from those of their associated streams. |