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

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

Issue 9582034: Fork SPDY/2 and SPDY/3 versions of our SPDY tests, in preparation for landing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Fix merge bug Created 8 years, 9 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
« no previous file with comments | « net/spdy/spdy_session.h ('k') | net/spdy/spdy_session_spdy2_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 16 matching lines...) Expand all
27 27
28 namespace net { 28 namespace net {
29 29
30 class AddressList; 30 class AddressList;
31 class BoundNetLog; 31 class BoundNetLog;
32 class ClientSocketHandle; 32 class ClientSocketHandle;
33 class HostResolver; 33 class HostResolver;
34 class HttpServerProperties; 34 class HttpServerProperties;
35 class SpdySession; 35 class SpdySession;
36 36
37 namespace test_spdy2 {
38 class SpdySessionPoolPeer;
39 } // namespace test_spdy
40
41 namespace test_spdy3 {
42 class SpdySessionPoolPeer;
43 } // namespace test_spdy
44
37 // This is a very simple pool for open SpdySessions. 45 // This is a very simple pool for open SpdySessions.
38 class NET_EXPORT SpdySessionPool 46 class NET_EXPORT SpdySessionPool
39 : public NetworkChangeNotifier::IPAddressObserver, 47 : public NetworkChangeNotifier::IPAddressObserver,
40 public SSLConfigService::Observer, 48 public SSLConfigService::Observer,
41 public CertDatabase::Observer { 49 public CertDatabase::Observer {
42 public: 50 public:
43 SpdySessionPool(HostResolver* host_resolver, 51 SpdySessionPool(HostResolver* host_resolver,
44 SSLConfigService* ssl_config_service, 52 SSLConfigService* ssl_config_service,
45 HttpServerProperties* http_server_properties); 53 HttpServerProperties* http_server_properties);
46 virtual ~SpdySessionPool(); 54 virtual ~SpdySessionPool();
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 136
129 // Controls whether the pool allows use of a common session for domains 137 // Controls whether the pool allows use of a common session for domains
130 // which share IP address resolutions. 138 // which share IP address resolutions.
131 static void enable_ip_pooling(bool value) { g_enable_ip_pooling = value; } 139 static void enable_ip_pooling(bool value) { g_enable_ip_pooling = value; }
132 140
133 // CertDatabase::Observer methods: 141 // CertDatabase::Observer methods:
134 virtual void OnUserCertAdded(const X509Certificate* cert) OVERRIDE; 142 virtual void OnUserCertAdded(const X509Certificate* cert) OVERRIDE;
135 virtual void OnCertTrustChanged(const X509Certificate* cert) OVERRIDE; 143 virtual void OnCertTrustChanged(const X509Certificate* cert) OVERRIDE;
136 144
137 private: 145 private:
138 friend class SpdySessionPoolPeer; // For testing. 146 friend class test_spdy2::SpdySessionPoolPeer; // For testing.
139 friend class SpdyNetworkTransactionTest; // For testing. 147 friend class test_spdy3::SpdySessionPoolPeer; // For testing.
140 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, WindowUpdateOverflow); 148 friend class SpdyNetworkTransactionSpdy2Test; // For testing.
149 friend class SpdyNetworkTransactionSpdy21Test; // For testing.
150 friend class SpdyNetworkTransactionSpdy3Test; // For testing.
151 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionSpdy2Test,
152 WindowUpdateOverflow);
153 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionSpdy21Test,
154 WindowUpdateOverflow);
155 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionSpdy3Test,
156 WindowUpdateOverflow);
141 157
142 typedef std::list<scoped_refptr<SpdySession> > SpdySessionList; 158 typedef std::list<scoped_refptr<SpdySession> > SpdySessionList;
143 typedef std::map<HostPortProxyPair, SpdySessionList*> SpdySessionsMap; 159 typedef std::map<HostPortProxyPair, SpdySessionList*> SpdySessionsMap;
144 typedef std::map<IPEndPoint, HostPortProxyPair> SpdyAliasMap; 160 typedef std::map<IPEndPoint, HostPortProxyPair> SpdyAliasMap;
145 161
146 162
147 scoped_refptr<SpdySession> GetInternal( 163 scoped_refptr<SpdySession> GetInternal(
148 const HostPortProxyPair& host_port_proxy_pair, 164 const HostPortProxyPair& host_port_proxy_pair,
149 const BoundNetLog& net_log, 165 const BoundNetLog& net_log,
150 bool only_use_existing_sessions); 166 bool only_use_existing_sessions);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 209
194 // Defaults to true. May be controlled via SpdySessionPoolPeer for tests. 210 // Defaults to true. May be controlled via SpdySessionPoolPeer for tests.
195 bool verify_domain_authentication_; 211 bool verify_domain_authentication_;
196 212
197 DISALLOW_COPY_AND_ASSIGN(SpdySessionPool); 213 DISALLOW_COPY_AND_ASSIGN(SpdySessionPool);
198 }; 214 };
199 215
200 } // namespace net 216 } // namespace net
201 217
202 #endif // NET_SPDY_SPDY_SESSION_POOL_H_ 218 #endif // NET_SPDY_SPDY_SESSION_POOL_H_
OLDNEW
« no previous file with comments | « net/spdy/spdy_session.h ('k') | net/spdy/spdy_session_spdy2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698