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

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

Issue 1547273003: Set trusted SPDY proxy dynamically on per-profile basis (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added net/base/test_proxy_delegate.{h,cc} Created 4 years, 10 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
« no previous file with comments | « net/spdy/spdy_session.cc ('k') | net/spdy/spdy_session_pool.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 16 matching lines...) Expand all
27 #include "net/spdy/spdy_session_key.h" 27 #include "net/spdy/spdy_session_key.h"
28 #include "net/ssl/ssl_config_service.h" 28 #include "net/ssl/ssl_config_service.h"
29 29
30 namespace net { 30 namespace net {
31 31
32 class AddressList; 32 class AddressList;
33 class BoundNetLog; 33 class BoundNetLog;
34 class ClientSocketHandle; 34 class ClientSocketHandle;
35 class HostResolver; 35 class HostResolver;
36 class HttpServerProperties; 36 class HttpServerProperties;
37 class ProxyDelegate;
37 class SpdySession; 38 class SpdySession;
38 class TransportSecurityState; 39 class TransportSecurityState;
39 40
40 // This is a very simple pool for open SpdySessions. 41 // This is a very simple pool for open SpdySessions.
41 class NET_EXPORT SpdySessionPool 42 class NET_EXPORT SpdySessionPool
42 : public NetworkChangeNotifier::IPAddressObserver, 43 : public NetworkChangeNotifier::IPAddressObserver,
43 public SSLConfigService::Observer, 44 public SSLConfigService::Observer,
44 public CertDatabase::Observer { 45 public CertDatabase::Observer {
45 public: 46 public:
46 typedef base::TimeTicks (*TimeFunc)(void); 47 typedef base::TimeTicks (*TimeFunc)(void);
47 48
48 // |default_protocol| may be kProtoUnknown (e.g., if SPDY is 49 // |default_protocol| may be kProtoUnknown (e.g., if SPDY is
49 // disabled), in which case it's set to a default value. Otherwise, 50 // disabled), in which case it's set to a default value. Otherwise,
50 // it must be a SPDY protocol. 51 // it must be a SPDY protocol.
51 SpdySessionPool( 52 SpdySessionPool(
52 HostResolver* host_resolver, 53 HostResolver* host_resolver,
53 SSLConfigService* ssl_config_service, 54 SSLConfigService* ssl_config_service,
54 const base::WeakPtr<HttpServerProperties>& http_server_properties, 55 const base::WeakPtr<HttpServerProperties>& http_server_properties,
55 TransportSecurityState* transport_security_state, 56 TransportSecurityState* transport_security_state,
56 bool enable_compression, 57 bool enable_compression,
57 bool enable_ping_based_connection_checking, 58 bool enable_ping_based_connection_checking,
58 NextProto default_protocol, 59 NextProto default_protocol,
59 size_t session_max_recv_window_size, 60 size_t session_max_recv_window_size,
60 size_t stream_max_recv_window_size, 61 size_t stream_max_recv_window_size,
61 size_t initial_max_concurrent_streams, 62 size_t initial_max_concurrent_streams,
62 SpdySessionPool::TimeFunc time_func, 63 SpdySessionPool::TimeFunc time_func,
63 const std::string& trusted_spdy_proxy); 64 ProxyDelegate* proxy_delegate);
64 ~SpdySessionPool() override; 65 ~SpdySessionPool() override;
65 66
66 // In the functions below, a session is "available" if this pool has 67 // In the functions below, a session is "available" if this pool has
67 // a reference to it and there is some SpdySessionKey for which 68 // a reference to it and there is some SpdySessionKey for which
68 // FindAvailableSession() will return it. A session is "unavailable" 69 // FindAvailableSession() will return it. A session is "unavailable"
69 // if this pool has a reference to it but it won't be returned by 70 // if this pool has a reference to it but it won't be returned by
70 // FindAvailableSession() for any SpdySessionKey; for example, this 71 // FindAvailableSession() for any SpdySessionKey; for example, this
71 // can happen when a session receives a GOAWAY frame and is still 72 // can happen when a session receives a GOAWAY frame and is still
72 // processing existing streams. 73 // processing existing streams.
73 74
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 bool verify_domain_authentication_; 211 bool verify_domain_authentication_;
211 bool enable_sending_initial_data_; 212 bool enable_sending_initial_data_;
212 bool enable_compression_; 213 bool enable_compression_;
213 bool enable_ping_based_connection_checking_; 214 bool enable_ping_based_connection_checking_;
214 const NextProto default_protocol_; 215 const NextProto default_protocol_;
215 size_t session_max_recv_window_size_; 216 size_t session_max_recv_window_size_;
216 size_t stream_max_recv_window_size_; 217 size_t stream_max_recv_window_size_;
217 size_t initial_max_concurrent_streams_; 218 size_t initial_max_concurrent_streams_;
218 TimeFunc time_func_; 219 TimeFunc time_func_;
219 220
220 // This SPDY proxy is allowed to push resources from origins that are 221 // Determines if a proxy is a trusted SPDY proxy, which is allowed to push
221 // different from those of their associated streams. 222 // resources from origins that are different from those of their associated
222 HostPortPair trusted_spdy_proxy_; 223 // streams. May be nullptr.
224 ProxyDelegate* proxy_delegate_;
223 225
224 DISALLOW_COPY_AND_ASSIGN(SpdySessionPool); 226 DISALLOW_COPY_AND_ASSIGN(SpdySessionPool);
225 }; 227 };
226 228
227 } // namespace net 229 } // namespace net
228 230
229 #endif // NET_SPDY_SPDY_SESSION_POOL_H_ 231 #endif // NET_SPDY_SPDY_SESSION_POOL_H_
OLDNEW
« no previous file with comments | « net/spdy/spdy_session.cc ('k') | net/spdy/spdy_session_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698