[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef NET_HTTP_HTTP_NETWORK_SESSION_H_ |
| 6 | #define NET_HTTP_HTTP_NETWORK_SESSION_H_ |
| 7 | |
Avi Drissman | 13fc893 | 2015-12-20 04:40:46 | [diff] [blame] | 8 | #include <stddef.h> |
| 9 | #include <stdint.h> |
| 10 | |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 11 | #include <set> |
| 12 | #include <string> |
rch | 74da0e1a | 2016-01-14 02:49:32 | [diff] [blame] | 13 | #include <unordered_set> |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 14 | #include <vector> |
| 15 | |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 16 | #include "base/memory/ref_counted.h" |
| 17 | #include "base/memory/weak_ptr.h" |
| 18 | #include "base/threading/non_thread_safe.h" |
| 19 | #include "net/base/host_port_pair.h" |
| 20 | #include "net/base/net_export.h" |
| 21 | #include "net/dns/host_resolver.h" |
| 22 | #include "net/http/http_auth_cache.h" |
| 23 | #include "net/http/http_stream_factory.h" |
| 24 | #include "net/quic/quic_stream_factory.h" |
| 25 | #include "net/socket/next_proto.h" |
| 26 | #include "net/spdy/spdy_session_pool.h" |
| 27 | #include "net/ssl/ssl_client_auth_cache.h" |
| 28 | |
| 29 | namespace base { |
| 30 | class Value; |
| 31 | } |
| 32 | |
| 33 | namespace net { |
| 34 | |
estark | 6f9b3d8 | 2016-01-12 21:37:05 | [diff] [blame] | 35 | class CTPolicyEnforcer; |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 36 | class CertVerifier; |
[email protected] | 6b8a3c74 | 2014-07-25 00:25:35 | [diff] [blame] | 37 | class ChannelIDService; |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 38 | class ClientSocketFactory; |
| 39 | class ClientSocketPoolManager; |
| 40 | class CTVerifier; |
| 41 | class HostResolver; |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 42 | class HttpAuthHandlerFactory; |
| 43 | class HttpNetworkSessionPeer; |
| 44 | class HttpProxyClientSocketPool; |
| 45 | class HttpResponseBodyDrainer; |
| 46 | class HttpServerProperties; |
| 47 | class NetLog; |
bengr | 39e40610 | 2014-09-10 23:04:46 | [diff] [blame] | 48 | class ProxyDelegate; |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 49 | class ProxyService; |
| 50 | class QuicClock; |
| 51 | class QuicCryptoClientStreamFactory; |
| 52 | class QuicServerInfoFactory; |
tbansal | ba8f411 | 2015-09-03 21:57:19 | [diff] [blame] | 53 | class SocketPerformanceWatcherFactory; |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 54 | class SOCKSClientSocketPool; |
| 55 | class SSLClientSocketPool; |
| 56 | class SSLConfigService; |
| 57 | class TransportClientSocketPool; |
| 58 | class TransportSecurityState; |
| 59 | |
| 60 | // This class holds session objects used by HttpNetworkTransaction objects. |
| 61 | class NET_EXPORT HttpNetworkSession |
mmenke | e65e7af | 2015-10-13 17:16:42 | [diff] [blame] | 62 | : NON_EXPORTED_BASE(public base::NonThreadSafe) { |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 63 | public: |
| 64 | struct NET_EXPORT Params { |
| 65 | Params(); |
vmpstr | acd23b7 | 2016-02-26 21:08:55 | [diff] [blame] | 66 | Params(const Params& other); |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 67 | ~Params(); |
| 68 | |
| 69 | ClientSocketFactory* client_socket_factory; |
| 70 | HostResolver* host_resolver; |
| 71 | CertVerifier* cert_verifier; |
[email protected] | 6b8a3c74 | 2014-07-25 00:25:35 | [diff] [blame] | 72 | ChannelIDService* channel_id_service; |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 73 | TransportSecurityState* transport_security_state; |
| 74 | CTVerifier* cert_transparency_verifier; |
rsleevi | d6de830 | 2016-06-21 01:33:20 | [diff] [blame] | 75 | CTPolicyEnforcer* ct_policy_enforcer; |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 76 | ProxyService* proxy_service; |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 77 | SSLConfigService* ssl_config_service; |
| 78 | HttpAuthHandlerFactory* http_auth_handler_factory; |
bnc | 525e175a | 2016-06-20 12:36:40 | [diff] [blame] | 79 | HttpServerProperties* http_server_properties; |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 80 | NetLog* net_log; |
| 81 | HostMappingRules* host_mapping_rules; |
tbansal | ba8f411 | 2015-09-03 21:57:19 | [diff] [blame] | 82 | SocketPerformanceWatcherFactory* socket_performance_watcher_factory; |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 83 | bool ignore_certificate_errors; |
Avi Drissman | 13fc893 | 2015-12-20 04:40:46 | [diff] [blame] | 84 | uint16_t testing_fixed_http_port; |
| 85 | uint16_t testing_fixed_https_port; |
jri | f9b4bec | 2014-09-15 15:46:54 | [diff] [blame] | 86 | bool enable_tcp_fast_open_for_ssl; |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 87 | |
rch | d502a30 | 2015-10-16 03:57:21 | [diff] [blame] | 88 | // Use SPDY ping frames to test for connection health after idle. |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 89 | bool enable_spdy_ping_based_connection_checking; |
| 90 | NextProto spdy_default_protocol; |
bnc | 3f0118e | 2016-02-02 15:42:22 | [diff] [blame] | 91 | bool enable_spdy31; |
| 92 | bool enable_http2; |
bnc | 8f0f3b6 | 2015-04-08 04:37:23 | [diff] [blame] | 93 | size_t spdy_session_max_recv_window_size; |
| 94 | size_t spdy_stream_max_recv_window_size; |
rch | d502a30 | 2015-10-16 03:57:21 | [diff] [blame] | 95 | // Source of time for SPDY connections. |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 96 | SpdySessionPool::TimeFunc time_func; |
bnc | a8681534 | 2016-06-27 12:27:48 | [diff] [blame^] | 97 | // Whether to enable HTTP/2 Alt-Svc entries with hostname different than |
| 98 | // that of the origin. |
| 99 | bool enable_http2_alternative_service_with_different_host; |
| 100 | // Whether to enable QUIC Alt-Svc entries with hostname different than that |
| 101 | // of the origin. |
| 102 | bool enable_quic_alternative_service_with_different_host; |
bnc | e3dd56f | 2016-06-01 10:37:11 | [diff] [blame] | 103 | // Only set for tests. |
| 104 | // TODO(bnc) https://crbug.com/615497: |
| 105 | // Adapt tests to https requests, remove this member. |
| 106 | bool enable_alternative_service_for_insecure_origins; |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 107 | |
bnc | 65b9931 | 2015-10-29 01:05:36 | [diff] [blame] | 108 | // Enables NPN support. Note that ALPN is always enabled. |
| 109 | bool enable_npn; |
| 110 | |
rdsmith | 2e54d1f | 2016-03-21 19:48:17 | [diff] [blame] | 111 | // Enable setting of HTTP/2 dependencies based on priority. |
| 112 | bool enable_priority_dependencies; |
| 113 | |
rch | d502a30 | 2015-10-16 03:57:21 | [diff] [blame] | 114 | // Enables QUIC support. |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 115 | bool enable_quic; |
zhongyi | 75527dd | 2016-01-21 22:26:43 | [diff] [blame] | 116 | // Disable QUIC if a connection times out with open streams. |
| 117 | bool disable_quic_on_timeout_with_open_streams; |
rch | d502a30 | 2015-10-16 03:57:21 | [diff] [blame] | 118 | // Instruct QUIC to use consistent ephemeral ports when talking to |
| 119 | // the same server. |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 120 | bool enable_quic_port_selection; |
rch | d502a30 | 2015-10-16 03:57:21 | [diff] [blame] | 121 | // Disables QUIC's 0-RTT behavior. |
jri | 2b966f2 | 2014-09-02 22:25:36 | [diff] [blame] | 122 | bool quic_always_require_handshake_confirmation; |
rch | d502a30 | 2015-10-16 03:57:21 | [diff] [blame] | 123 | // Disables QUIC connection pooling. |
jri | 584002d1 | 2014-09-09 00:51:28 | [diff] [blame] | 124 | bool quic_disable_connection_pooling; |
rch | d502a30 | 2015-10-16 03:57:21 | [diff] [blame] | 125 | // If not zero, the task to load QUIC server configs from the disk cache |
| 126 | // will timeout after this value multiplied by the smoothed RTT for the |
| 127 | // server. |
rtenneti | 2912825c | 2015-01-06 01:19:46 | [diff] [blame] | 128 | float quic_load_server_info_timeout_srtt_multiplier; |
rch | d502a30 | 2015-10-16 03:57:21 | [diff] [blame] | 129 | // Causes QUIC to race reading the server config from disk with |
| 130 | // sending an inchoate CHLO. |
rtenneti | 4f80997 | 2015-02-11 19:38:34 | [diff] [blame] | 131 | bool quic_enable_connection_racing; |
rch | d502a30 | 2015-10-16 03:57:21 | [diff] [blame] | 132 | // Use non-blocking IO for UDP sockets. |
qyearsley | 3257b7de | 2015-02-28 06:59:03 | [diff] [blame] | 133 | bool quic_enable_non_blocking_io; |
rch | d502a30 | 2015-10-16 03:57:21 | [diff] [blame] | 134 | // Disables using the disk cache to store QUIC server configs. |
rtenneti | 34dffe75 | 2015-02-24 23:27:32 | [diff] [blame] | 135 | bool quic_disable_disk_cache; |
rch | d502a30 | 2015-10-16 03:57:21 | [diff] [blame] | 136 | // Prefer AES-GCM to ChaCha20 even if no hardware support is present. |
rch | 9976b0c | 2015-06-10 21:27:23 | [diff] [blame] | 137 | bool quic_prefer_aes; |
rch | d502a30 | 2015-10-16 03:57:21 | [diff] [blame] | 138 | // Specifies the maximum number of connections with high packet loss in |
| 139 | // a row after which QUIC will be disabled. |
rtenneti | 85dcfac2 | 2015-03-27 20:22:19 | [diff] [blame] | 140 | int quic_max_number_of_lossy_connections; |
rch | d502a30 | 2015-10-16 03:57:21 | [diff] [blame] | 141 | // Specifies packet loss rate in fraction after which a connection is |
| 142 | // closed and is considered as a lossy connection. |
rtenneti | 85dcfac2 | 2015-03-27 20:22:19 | [diff] [blame] | 143 | float quic_packet_loss_threshold; |
rch | d502a30 | 2015-10-16 03:57:21 | [diff] [blame] | 144 | // Size in bytes of the QUIC DUP socket receive buffer. |
rch | c743357 | 2015-02-27 18:16:51 | [diff] [blame] | 145 | int quic_socket_receive_buffer_size; |
rtenneti | b8e80fb | 2016-05-16 00:12:09 | [diff] [blame] | 146 | // Delay starting a TCP connection when QUIC believes it can speak |
| 147 | // 0-RTT to a server. |
| 148 | bool quic_delay_tcp_race; |
rtenneti | 6971c17 | 2016-01-15 20:12:10 | [diff] [blame] | 149 | // Maximum number of server configs that are to be stored in |
| 150 | // HttpServerProperties, instead of the disk cache. |
| 151 | size_t quic_max_server_configs_stored_in_properties; |
rtenneti | 8a2f463 | 2016-03-21 20:26:57 | [diff] [blame] | 152 | // If not empty, QUIC will be used for all connections to the set of |
| 153 | // origins in |origins_to_force_quic_on|. |
| 154 | std::set<HostPortPair> origins_to_force_quic_on; |
rch | d502a30 | 2015-10-16 03:57:21 | [diff] [blame] | 155 | // Source of time for QUIC connections. Will be owned by QuicStreamFactory. |
| 156 | QuicClock* quic_clock; |
| 157 | // Source of entropy for QUIC connections. |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 158 | QuicRandom* quic_random; |
rch | d502a30 | 2015-10-16 03:57:21 | [diff] [blame] | 159 | // Limit on the size of QUIC packets. |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 160 | size_t quic_max_packet_length; |
rch | d502a30 | 2015-10-16 03:57:21 | [diff] [blame] | 161 | // User agent description to send in the QUIC handshake. |
[email protected] | 0c4017ca | 2014-06-06 03:30:45 | [diff] [blame] | 162 | std::string quic_user_agent_id; |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 163 | bool enable_user_alternate_protocol_ports; |
rch | d502a30 | 2015-10-16 03:57:21 | [diff] [blame] | 164 | // Optional factory to use for creating QuicCryptoClientStreams. |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 165 | QuicCryptoClientStreamFactory* quic_crypto_client_stream_factory; |
rch | d502a30 | 2015-10-16 03:57:21 | [diff] [blame] | 166 | // Versions of QUIC which may be used. |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 167 | QuicVersionVector quic_supported_versions; |
ckrasic | 1e53b64 | 2015-07-08 22:39:35 | [diff] [blame] | 168 | int quic_max_recent_disabled_reasons; |
| 169 | int quic_threshold_public_resets_post_handshake; |
| 170 | int quic_threshold_timeouts_streams_open; |
jri | 8c44d69 | 2015-10-23 23:53:41 | [diff] [blame] | 171 | // Set of QUIC tags to send in the handshake's connection options. |
[email protected] | 488a0e25 | 2014-06-25 04:37:44 | [diff] [blame] | 172 | QuicTagVector quic_connection_options; |
jri | 8c44d69 | 2015-10-23 23:53:41 | [diff] [blame] | 173 | // If true, all QUIC sessions are closed when any local IP address changes. |
| 174 | bool quic_close_sessions_on_ip_change; |
rtenneti | 41c0999 | 2015-11-30 18:24:01 | [diff] [blame] | 175 | // Specifes QUIC idle connection state lifetime. |
| 176 | int quic_idle_connection_timeout_seconds; |
rtenneti | d2e74caa | 2015-12-09 00:51:57 | [diff] [blame] | 177 | // If true, disable preconnections if QUIC can do 0RTT. |
| 178 | bool quic_disable_preconnect_if_0rtt; |
rch | 74da0e1a | 2016-01-14 02:49:32 | [diff] [blame] | 179 | // List of hosts for which QUIC is explicitly whitelisted. |
| 180 | std::unordered_set<std::string> quic_host_whitelist; |
jri | d36ada6 | 2016-02-06 02:42:08 | [diff] [blame] | 181 | // If true, active QUIC sessions may be migrated onto a new network when |
| 182 | // the platform indicates that the default network is changing. |
jri | 7e63664 | 2016-01-14 06:57:08 | [diff] [blame] | 183 | bool quic_migrate_sessions_on_network_change; |
jri | d36ada6 | 2016-02-06 02:42:08 | [diff] [blame] | 184 | // If true, active QUIC sessions experiencing poor connectivity may be |
| 185 | // migrated onto a new network. |
| 186 | bool quic_migrate_sessions_early; |
xunjieli | 888c2992 | 2016-03-18 21:05:09 | [diff] [blame] | 187 | // If true, bidirectional streams over QUIC will be disabled. |
| 188 | bool quic_disable_bidirectional_streams; |
| 189 | |
bengr | 39e40610 | 2014-09-10 23:04:46 | [diff] [blame] | 190 | ProxyDelegate* proxy_delegate; |
nharper | b7441ef | 2016-01-25 23:54:14 | [diff] [blame] | 191 | // Enable support for Token Binding. |
| 192 | bool enable_token_binding; |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 193 | }; |
| 194 | |
| 195 | enum SocketPoolType { |
| 196 | NORMAL_SOCKET_POOL, |
| 197 | WEBSOCKET_SOCKET_POOL, |
| 198 | NUM_SOCKET_POOL_TYPES |
| 199 | }; |
| 200 | |
| 201 | explicit HttpNetworkSession(const Params& params); |
mmenke | e65e7af | 2015-10-13 17:16:42 | [diff] [blame] | 202 | ~HttpNetworkSession(); |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 203 | |
| 204 | HttpAuthCache* http_auth_cache() { return &http_auth_cache_; } |
| 205 | SSLClientAuthCache* ssl_client_auth_cache() { |
| 206 | return &ssl_client_auth_cache_; |
| 207 | } |
| 208 | |
| 209 | void AddResponseDrainer(HttpResponseBodyDrainer* drainer); |
| 210 | |
| 211 | void RemoveResponseDrainer(HttpResponseBodyDrainer* drainer); |
| 212 | |
| 213 | TransportClientSocketPool* GetTransportSocketPool(SocketPoolType pool_type); |
| 214 | SSLClientSocketPool* GetSSLSocketPool(SocketPoolType pool_type); |
| 215 | SOCKSClientSocketPool* GetSocketPoolForSOCKSProxy( |
| 216 | SocketPoolType pool_type, |
| 217 | const HostPortPair& socks_proxy); |
| 218 | HttpProxyClientSocketPool* GetSocketPoolForHTTPProxy( |
| 219 | SocketPoolType pool_type, |
| 220 | const HostPortPair& http_proxy); |
| 221 | SSLClientSocketPool* GetSocketPoolForSSLWithProxy( |
| 222 | SocketPoolType pool_type, |
| 223 | const HostPortPair& proxy_server); |
| 224 | |
| 225 | CertVerifier* cert_verifier() { return cert_verifier_; } |
| 226 | ProxyService* proxy_service() { return proxy_service_; } |
| 227 | SSLConfigService* ssl_config_service() { return ssl_config_service_.get(); } |
| 228 | SpdySessionPool* spdy_session_pool() { return &spdy_session_pool_; } |
| 229 | QuicStreamFactory* quic_stream_factory() { return &quic_stream_factory_; } |
| 230 | HttpAuthHandlerFactory* http_auth_handler_factory() { |
| 231 | return http_auth_handler_factory_; |
| 232 | } |
bnc | 525e175a | 2016-06-20 12:36:40 | [diff] [blame] | 233 | HttpServerProperties* http_server_properties() { |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 234 | return http_server_properties_; |
| 235 | } |
| 236 | HttpStreamFactory* http_stream_factory() { |
| 237 | return http_stream_factory_.get(); |
| 238 | } |
| 239 | HttpStreamFactory* http_stream_factory_for_websocket() { |
| 240 | return http_stream_factory_for_websocket_.get(); |
| 241 | } |
| 242 | NetLog* net_log() { |
| 243 | return net_log_; |
| 244 | } |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 245 | |
payal.pandey | 62a40029 | 2015-05-28 09:29:54 | [diff] [blame] | 246 | // Creates a Value summary of the state of the socket pools. |
danakj | 1fd259a0 | 2016-04-16 03:17:09 | [diff] [blame] | 247 | std::unique_ptr<base::Value> SocketPoolInfoToValue() const; |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 248 | |
payal.pandey | 91cb231 | 2015-05-27 07:41:51 | [diff] [blame] | 249 | // Creates a Value summary of the state of the SPDY sessions. |
danakj | 1fd259a0 | 2016-04-16 03:17:09 | [diff] [blame] | 250 | std::unique_ptr<base::Value> SpdySessionPoolInfoToValue() const; |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 251 | |
| 252 | // Creates a Value summary of the state of the QUIC sessions and |
payal.pandey | a18956a | 2015-05-27 05:57:55 | [diff] [blame] | 253 | // configuration. |
danakj | 1fd259a0 | 2016-04-16 03:17:09 | [diff] [blame] | 254 | std::unique_ptr<base::Value> QuicInfoToValue() const; |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 255 | |
| 256 | void CloseAllConnections(); |
| 257 | void CloseIdleConnections(); |
| 258 | |
| 259 | // Returns the original Params used to construct this session. |
| 260 | const Params& params() const { return params_; } |
| 261 | |
| 262 | bool IsProtocolEnabled(AlternateProtocol protocol) const; |
| 263 | |
bnc | 1f29537 | 2015-10-21 23:24:22 | [diff] [blame] | 264 | // Populates |*alpn_protos| with protocols to be used with ALPN. |
| 265 | void GetAlpnProtos(NextProtoVector* alpn_protos) const; |
| 266 | |
| 267 | // Populates |*npn_protos| with protocols to be used with NPN. |
| 268 | void GetNpnProtos(NextProtoVector* npn_protos) const; |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 269 | |
nharper | 8cdb0fb | 2016-04-22 21:34:59 | [diff] [blame] | 270 | // Populates |server_config| and |proxy_config| based on this session and |
| 271 | // |request|. |
| 272 | void GetSSLConfig(const HttpRequestInfo& request, |
| 273 | SSLConfig* server_config, |
| 274 | SSLConfig* proxy_config) const; |
| 275 | |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 276 | private: |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 277 | friend class HttpNetworkSessionPeer; |
| 278 | |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 279 | ClientSocketPoolManager* GetSocketPoolManager(SocketPoolType pool_type); |
| 280 | |
| 281 | NetLog* const net_log_; |
bnc | 525e175a | 2016-06-20 12:36:40 | [diff] [blame] | 282 | HttpServerProperties* const http_server_properties_; |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 283 | CertVerifier* const cert_verifier_; |
| 284 | HttpAuthHandlerFactory* const http_auth_handler_factory_; |
| 285 | |
| 286 | // Not const since it's modified by HttpNetworkSessionPeer for testing. |
| 287 | ProxyService* proxy_service_; |
| 288 | const scoped_refptr<SSLConfigService> ssl_config_service_; |
| 289 | |
| 290 | HttpAuthCache http_auth_cache_; |
| 291 | SSLClientAuthCache ssl_client_auth_cache_; |
danakj | 1fd259a0 | 2016-04-16 03:17:09 | [diff] [blame] | 292 | std::unique_ptr<ClientSocketPoolManager> normal_socket_pool_manager_; |
| 293 | std::unique_ptr<ClientSocketPoolManager> websocket_socket_pool_manager_; |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 294 | QuicStreamFactory quic_stream_factory_; |
| 295 | SpdySessionPool spdy_session_pool_; |
danakj | 1fd259a0 | 2016-04-16 03:17:09 | [diff] [blame] | 296 | std::unique_ptr<HttpStreamFactory> http_stream_factory_; |
| 297 | std::unique_ptr<HttpStreamFactory> http_stream_factory_for_websocket_; |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 298 | std::set<HttpResponseBodyDrainer*> response_drainers_; |
| 299 | |
bnc | 0d23cf4 | 2014-12-11 14:09:46 | [diff] [blame] | 300 | NextProtoVector next_protos_; |
[email protected] | cf4cae3 | 2014-05-27 00:39:10 | [diff] [blame] | 301 | bool enabled_protocols_[NUM_VALID_ALTERNATE_PROTOCOLS]; |
| 302 | |
| 303 | Params params_; |
| 304 | }; |
| 305 | |
| 306 | } // namespace net |
| 307 | |
| 308 | #endif // NET_HTTP_HTTP_NETWORK_SESSION_H_ |