diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-23 01:01:31 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-23 01:01:31 +0000 |
commit | 102e27c64d9deae4c32f346214fd7c2bddaa9fb3 (patch) | |
tree | d7372b853f79764c4ec200f4cd6d26c9bb512d65 /net/spdy/spdy_session_pool.h | |
parent | d7f21d5584fb4962617644833fd2a80b6d0c7e8d (diff) | |
download | chromium_src-102e27c64d9deae4c32f346214fd7c2bddaa9fb3.zip chromium_src-102e27c64d9deae4c32f346214fd7c2bddaa9fb3.tar.gz chromium_src-102e27c64d9deae4c32f346214fd7c2bddaa9fb3.tar.bz2 |
Refactor HttpStreamFactory.
Rename StreamFactory and StreamRequest to HttpStreamFactory and HttpStreamRequest.
Rename HttpStreamFactory to HttpStreamFactoryImpl.
Create HttpStreamFactoryImpl::Request (inherits from HttpStreamRequest) and HttpStreamFactoryImpl::Job (most of the old HttpStreamRequest code, other than the interface, moved here).
Currently there is still a strong binding within HttpStreamFactoryImpl between requests and jobs. This will be removed in a future changelist.
Note that due to the preparation for late binding, information like HttpRequestInfo and SSLConfig and ProxyInfo are just copied. It's possible we can consider refcounting them to reduce copies, but I think it's not worth the effort / ugliness.
I also did some minor cleanups like moving SpdySettingsStorage into SpdySessionPool and some CloseIdleConnections() cleanup.
BUG=54371,42669
TEST=unit tests
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=75668
Review URL: http://codereview.chromium.org/6543004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75688 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_session_pool.h')
-rw-r--r-- | net/spdy/spdy_session_pool.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/net/spdy/spdy_session_pool.h b/net/spdy/spdy_session_pool.h index 7f30b20..10da747 100644 --- a/net/spdy/spdy_session_pool.h +++ b/net/spdy/spdy_session_pool.h @@ -20,6 +20,7 @@ #include "net/base/ssl_config_service.h" #include "net/proxy/proxy_config.h" #include "net/proxy/proxy_server.h" +#include "net/spdy/spdy_settings_storage.h" namespace net { // Sessions are uniquely identified by their HostPortPair and the proxy server @@ -30,7 +31,6 @@ class BoundNetLog; class ClientSocketHandle; class HttpNetworkSession; class SpdySession; -class SpdySettingsStorage; // This is a very simple pool for open SpdySessions. // TODO(mbelshe): Make this production ready. @@ -45,7 +45,6 @@ class SpdySessionPool // use. scoped_refptr<SpdySession> Get( const HostPortProxyPair& host_port_proxy_pair, - SpdySettingsStorage* spdy_settings, const BoundNetLog& net_log); // Set the maximum concurrent sessions per domain. @@ -66,7 +65,6 @@ class SpdySessionPool // Returns an error on failure, and |spdy_session| will be NULL. net::Error GetSpdySessionFromSocket( const HostPortProxyPair& host_port_proxy_pair, - SpdySettingsStorage* spdy_settings, ClientSocketHandle* connection, const BoundNetLog& net_log, int certificate_error_code, @@ -92,6 +90,9 @@ class SpdySessionPool // responsible for deleting the returned value. Value* SpdySessionPoolInfoToValue() const; + SpdySettingsStorage* mutable_spdy_settings() { return &spdy_settings_; } + const SpdySettingsStorage& spdy_settings() const { return spdy_settings_; } + // NetworkChangeNotifier::Observer methods: // We flush all idle sessions and release references to the active ones so @@ -124,6 +125,8 @@ class SpdySessionPool const HostPortProxyPair& host_port_proxy_pair) const; void RemoveSessionList(const HostPortProxyPair& host_port_proxy_pair); + SpdySettingsStorage spdy_settings_; + // This is our weak session pool - one session per domain. SpdySessionsMap sessions_; |