OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <list> | 10 #include <list> |
(...skipping 22 matching lines...) Expand all Loading... |
33 class HostResolver; | 33 class HostResolver; |
34 class HttpNetworkSession; | 34 class HttpNetworkSession; |
35 class SpdySession; | 35 class SpdySession; |
36 | 36 |
37 // This is a very simple pool for open SpdySessions. | 37 // This is a very simple pool for open SpdySessions. |
38 class NET_API SpdySessionPool | 38 class NET_API SpdySessionPool |
39 : public NetworkChangeNotifier::IPAddressObserver, | 39 : public NetworkChangeNotifier::IPAddressObserver, |
40 public SSLConfigService::Observer, | 40 public SSLConfigService::Observer, |
41 public CertDatabase::Observer { | 41 public CertDatabase::Observer { |
42 public: | 42 public: |
43 explicit SpdySessionPool(HostResolver* host_resolver, | 43 SpdySessionPool(HostResolver* host_resolver, |
44 SSLConfigService* ssl_config_service); | 44 SSLConfigService* ssl_config_service); |
45 virtual ~SpdySessionPool(); | 45 virtual ~SpdySessionPool(); |
46 | 46 |
47 // Either returns an existing SpdySession or creates a new SpdySession for | 47 // Either returns an existing SpdySession or creates a new SpdySession for |
48 // use. | 48 // use. |
49 scoped_refptr<SpdySession> Get( | 49 scoped_refptr<SpdySession> Get( |
50 const HostPortProxyPair& host_port_proxy_pair, | 50 const HostPortProxyPair& host_port_proxy_pair, |
51 const BoundNetLog& net_log); | 51 const BoundNetLog& net_log); |
52 | 52 |
53 // Only returns a SpdySession if it already exists. | 53 // Only returns a SpdySession if it already exists. |
54 scoped_refptr<SpdySession> GetIfExists( | 54 scoped_refptr<SpdySession> GetIfExists( |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 | 185 |
186 // Defaults to true. May be controlled via SpdySessionPoolPeer for tests. | 186 // Defaults to true. May be controlled via SpdySessionPoolPeer for tests. |
187 bool verify_domain_authentication_; | 187 bool verify_domain_authentication_; |
188 | 188 |
189 DISALLOW_COPY_AND_ASSIGN(SpdySessionPool); | 189 DISALLOW_COPY_AND_ASSIGN(SpdySessionPool); |
190 }; | 190 }; |
191 | 191 |
192 } // namespace net | 192 } // namespace net |
193 | 193 |
194 #endif // NET_SPDY_SPDY_SESSION_POOL_H_ | 194 #endif // NET_SPDY_SPDY_SESSION_POOL_H_ |
OLD | NEW |