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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 const HostPortProxyPair& host_port_proxy_pair); | 156 const HostPortProxyPair& host_port_proxy_pair); |
157 SpdySessionList* GetSessionList( | 157 SpdySessionList* GetSessionList( |
158 const HostPortProxyPair& host_port_proxy_pair) const; | 158 const HostPortProxyPair& host_port_proxy_pair) const; |
159 void RemoveSessionList(const HostPortProxyPair& host_port_proxy_pair); | 159 void RemoveSessionList(const HostPortProxyPair& host_port_proxy_pair); |
160 | 160 |
161 // Does a DNS cache lookup for |pair|, and returns the |addresses| found. | 161 // Does a DNS cache lookup for |pair|, and returns the |addresses| found. |
162 // Returns true if addresses found, false otherwise. | 162 // Returns true if addresses found, false otherwise. |
163 bool LookupAddresses(const HostPortProxyPair& pair, | 163 bool LookupAddresses(const HostPortProxyPair& pair, |
164 AddressList* addresses) const; | 164 AddressList* addresses) const; |
165 | 165 |
166 // Add a set of |addresses| as IP-equivalent addresses for |pair|. | 166 // Add |endpoint| as an IP-equivalent address for |pair|. |
167 void AddAliases(const AddressList& addresses, const HostPortProxyPair& pair); | 167 void AddAlias(const addrinfo* address, const HostPortProxyPair& pair); |
168 | 168 |
169 // Remove all aliases for |pair| from the aliases table. | 169 // Remove all aliases for |pair| from the aliases table. |
170 void RemoveAliases(const HostPortProxyPair& pair); | 170 void RemoveAliases(const HostPortProxyPair& pair); |
171 | 171 |
172 SpdySettingsStorage spdy_settings_; | 172 SpdySettingsStorage spdy_settings_; |
173 | 173 |
174 // This is our weak session pool - one session per domain. | 174 // This is our weak session pool - one session per domain. |
175 SpdySessionsMap sessions_; | 175 SpdySessionsMap sessions_; |
176 // A map of IPEndPoint aliases for sessions. | 176 // A map of IPEndPoint aliases for sessions. |
177 SpdyAliasMap aliases_; | 177 SpdyAliasMap aliases_; |
178 | 178 |
179 static size_t g_max_sessions_per_domain; | 179 static size_t g_max_sessions_per_domain; |
180 static bool g_force_single_domain; | 180 static bool g_force_single_domain; |
181 static bool g_enable_ip_pooling; | 181 static bool g_enable_ip_pooling; |
182 | 182 |
183 const scoped_refptr<SSLConfigService> ssl_config_service_; | 183 const scoped_refptr<SSLConfigService> ssl_config_service_; |
184 HostResolver* resolver_; | 184 HostResolver* resolver_; |
185 | 185 |
186 DISALLOW_COPY_AND_ASSIGN(SpdySessionPool); | 186 DISALLOW_COPY_AND_ASSIGN(SpdySessionPool); |
187 }; | 187 }; |
188 | 188 |
189 } // namespace net | 189 } // namespace net |
190 | 190 |
191 #endif // NET_SPDY_SPDY_SESSION_POOL_H_ | 191 #endif // NET_SPDY_SPDY_SESSION_POOL_H_ |
OLD | NEW |