| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef NET_SPDY_SPDY_SESSION_POOL_H_ | 5 #ifndef NET_SPDY_SPDY_SESSION_POOL_H_ |
| 6 #define NET_SPDY_SPDY_SESSION_POOL_H_ | 6 #define NET_SPDY_SPDY_SESSION_POOL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <list> | 9 #include <list> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 namespace test_spdy2 { | 35 namespace test_spdy2 { |
| 36 class SpdySessionPoolPeer; | 36 class SpdySessionPoolPeer; |
| 37 } // namespace test_spdy | 37 } // namespace test_spdy |
| 38 | 38 |
| 39 namespace test_spdy3 { | 39 namespace test_spdy3 { |
| 40 class SpdySessionPoolPeer; | 40 class SpdySessionPoolPeer; |
| 41 } // namespace test_spdy | 41 } // namespace test_spdy |
| 42 | 42 |
| 43 // This is a very simple pool for open SpdySessions. | 43 // This is a very simple pool for open SpdySessions. |
| 44 class NET_EXPORT SpdySessionPool | 44 class NET_EXPORT SpdySessionPool |
| 45 : public NetworkChangeNotifier::IPAddressObserver, | 45 : public NetworkChangeNotifier::NetworkChangeObserver, |
| 46 public SSLConfigService::Observer, | 46 public SSLConfigService::Observer, |
| 47 public CertDatabase::Observer { | 47 public CertDatabase::Observer { |
| 48 public: | 48 public: |
| 49 typedef base::TimeTicks (*TimeFunc)(void); | 49 typedef base::TimeTicks (*TimeFunc)(void); |
| 50 | 50 |
| 51 SpdySessionPool(HostResolver* host_resolver, | 51 SpdySessionPool(HostResolver* host_resolver, |
| 52 SSLConfigService* ssl_config_service, | 52 SSLConfigService* ssl_config_service, |
| 53 HttpServerProperties* http_server_properties, | 53 HttpServerProperties* http_server_properties, |
| 54 size_t max_sessions_per_domain, | 54 size_t max_sessions_per_domain, |
| 55 bool force_single_domain, | 55 bool force_single_domain, |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 | 120 |
| 121 HttpServerProperties* http_server_properties() { | 121 HttpServerProperties* http_server_properties() { |
| 122 return http_server_properties_; | 122 return http_server_properties_; |
| 123 } | 123 } |
| 124 | 124 |
| 125 // NetworkChangeNotifier::IPAddressObserver methods: | 125 // NetworkChangeNotifier::IPAddressObserver methods: |
| 126 | 126 |
| 127 // We flush all idle sessions and release references to the active ones so | 127 // We flush all idle sessions and release references to the active ones so |
| 128 // they won't get re-used. The active ones will either complete successfully | 128 // they won't get re-used. The active ones will either complete successfully |
| 129 // or error out due to the IP address change. | 129 // or error out due to the IP address change. |
| 130 virtual void OnIPAddressChanged() OVERRIDE; | 130 virtual void OnNetworkChanged( |
| 131 net::NetworkChangeNotifier::ConnectionType type) OVERRIDE; |
| 131 | 132 |
| 132 // SSLConfigService::Observer methods: | 133 // SSLConfigService::Observer methods: |
| 133 | 134 |
| 134 // We perform the same flushing as described above when SSL settings change. | 135 // We perform the same flushing as described above when SSL settings change. |
| 135 virtual void OnSSLConfigChanged() OVERRIDE; | 136 virtual void OnSSLConfigChanged() OVERRIDE; |
| 136 | 137 |
| 137 // CertDatabase::Observer methods: | 138 // CertDatabase::Observer methods: |
| 138 virtual void OnCertAdded(const X509Certificate* cert) OVERRIDE; | 139 virtual void OnCertAdded(const X509Certificate* cert) OVERRIDE; |
| 139 virtual void OnCertTrustChanged(const X509Certificate* cert) OVERRIDE; | 140 virtual void OnCertTrustChanged(const X509Certificate* cert) OVERRIDE; |
| 140 | 141 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 // This SPDY proxy is allowed to push resources from origins that are | 222 // This SPDY proxy is allowed to push resources from origins that are |
| 222 // different from those of their associated streams. | 223 // different from those of their associated streams. |
| 223 HostPortPair trusted_spdy_proxy_; | 224 HostPortPair trusted_spdy_proxy_; |
| 224 | 225 |
| 225 DISALLOW_COPY_AND_ASSIGN(SpdySessionPool); | 226 DISALLOW_COPY_AND_ASSIGN(SpdySessionPool); |
| 226 }; | 227 }; |
| 227 | 228 |
| 228 } // namespace net | 229 } // namespace net |
| 229 | 230 |
| 230 #endif // NET_SPDY_SPDY_SESSION_POOL_H_ | 231 #endif // NET_SPDY_SPDY_SESSION_POOL_H_ |
| OLD | NEW |