Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: net/spdy/spdy_session_pool.h

Issue 7349023: Changed SPDY's ip connection pooling logic to only add the used IP, (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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|.
wtc 2011/07/19 22:12:36 |endpoint| => |address|
ramant (doing other things) 2011/07/25 23:36:06 Done.
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* const resolver_; 184 HostResolver* const resolver_;
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698