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

Unified Diff: net/spdy/spdy_session_pool.h

Issue 11415219: Move a number of static variables SPDY to HttpNetworkSession::Params. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moar cleanup Created 8 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 side-by-side diff with in-line comments
Download patch
Index: net/spdy/spdy_session_pool.h
diff --git a/net/spdy/spdy_session_pool.h b/net/spdy/spdy_session_pool.h
index ebd9668d1c4f45de24c49a8e85c16b4e387f8c7a..9214a0ce510b74e9495f7fd8c59e9f67782cb90f 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,9 +198,7 @@ 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_;
@@ -209,6 +208,28 @@ class NET_EXPORT SpdySessionPool
bool enable_sending_initial_settings_;
+ size_t max_sessions_per_domain_;
+
willchan no longer on Chromium 2012/12/01 20:49:13 I try to avoid nitting on stuff like this, but all
Ryan Hamilton 2012/12/01 23:02:25 Done.
+ 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_;
+
+ SpdySessionPool::TimeFunc time_func_;
willchan no longer on Chromium 2012/12/01 20:49:13 No need for SpdySessionPool::
Ryan Hamilton 2012/12/01 23:02:25 Done.
+
// This SPDY proxy is allowed to push resources from origins that are
// different from those of their associated streams.
HostPortPair trusted_spdy_proxy_;

Powered by Google App Engine
This is Rietveld 408576698