OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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> |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
14 #include "base/gtest_prod_util.h" | 14 #include "base/gtest_prod_util.h" |
15 #include "base/ref_counted.h" | 15 #include "base/ref_counted.h" |
16 #include "base/scoped_ptr.h" | 16 #include "base/scoped_ptr.h" |
17 #include "net/base/host_port_pair.h" | 17 #include "net/base/host_port_pair.h" |
18 #include "net/base/net_errors.h" | 18 #include "net/base/net_errors.h" |
19 #include "net/base/network_change_notifier.h" | 19 #include "net/base/network_change_notifier.h" |
20 #include "net/proxy/proxy_config.h" | 20 #include "net/proxy/proxy_config.h" |
| 21 #include "net/proxy/proxy_server.h" |
21 | 22 |
22 namespace net { | 23 namespace net { |
23 // Sessions are uniquely identified by their HostPortPair and the PAC-style list | 24 // Sessions are uniquely identified by their HostPortPair and the proxy server |
24 // of valid proxy servers. | 25 // that will be used to connect to it (may be DIRECT). |
25 typedef std::pair<HostPortPair, std::string> HostPortProxyPair; | 26 typedef std::pair<HostPortPair, ProxyServer> HostPortProxyPair; |
26 | 27 |
27 class BoundNetLog; | 28 class BoundNetLog; |
28 class ClientSocketHandle; | 29 class ClientSocketHandle; |
29 class HttpNetworkSession; | 30 class HttpNetworkSession; |
30 class SpdySession; | 31 class SpdySession; |
31 | 32 |
32 // This is a very simple pool for open SpdySessions. | 33 // This is a very simple pool for open SpdySessions. |
33 // TODO(mbelshe): Make this production ready. | 34 // TODO(mbelshe): Make this production ready. |
34 class SpdySessionPool | 35 class SpdySessionPool |
35 : public base::RefCounted<SpdySessionPool>, | 36 : public base::RefCounted<SpdySessionPool>, |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 SpdySessionsMap sessions_; | 116 SpdySessionsMap sessions_; |
116 | 117 |
117 static int g_max_sessions_per_domain; | 118 static int g_max_sessions_per_domain; |
118 | 119 |
119 DISALLOW_COPY_AND_ASSIGN(SpdySessionPool); | 120 DISALLOW_COPY_AND_ASSIGN(SpdySessionPool); |
120 }; | 121 }; |
121 | 122 |
122 } // namespace net | 123 } // namespace net |
123 | 124 |
124 #endif // NET_SPDY_SPDY_SESSION_POOL_H_ | 125 #endif // NET_SPDY_SPDY_SESSION_POOL_H_ |
OLD | NEW |