blob: 6833a7b4325504032df216b03c8d59b2354123c7 [file] [log] [blame]
[email protected]cf4cae32014-05-27 00:39:101// 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 Drissman13fc8932015-12-20 04:40:468#include <stddef.h>
9#include <stdint.h>
10
avifceb32f62016-10-07 16:30:5211#include <map>
12#include <memory>
[email protected]cf4cae32014-05-27 00:39:1013#include <set>
14#include <string>
rch74da0e1a2016-01-14 02:49:3215#include <unordered_set>
[email protected]cf4cae32014-05-27 00:39:1016#include <vector>
17
maksim.sisov0adf8592016-07-15 06:25:5618#include "base/bind.h"
Yixin Wang10f477ed2017-11-21 04:20:2019#include "base/containers/flat_set.h"
maksim.sisov0adf8592016-07-15 06:25:5620#include "base/memory/memory_pressure_monitor.h"
[email protected]cf4cae32014-05-27 00:39:1021#include "base/memory/ref_counted.h"
22#include "base/memory/weak_ptr.h"
Bence Béky6a070bcd2018-09-06 15:02:4323#include "base/optional.h"
gab47aa7da2017-06-02 16:09:4324#include "base/threading/thread_checker.h"
Douglas Creager3cb042052018-11-06 23:08:5225#include "build/buildflag.h"
mmenke0d700dd82017-05-26 20:36:1126#include "net/base/host_mapping_rules.h"
[email protected]cf4cae32014-05-27 00:39:1027#include "net/base/host_port_pair.h"
28#include "net/base/net_export.h"
29#include "net/dns/host_resolver.h"
30#include "net/http/http_auth_cache.h"
31#include "net/http/http_stream_factory.h"
Douglas Creager3cb042052018-11-06 23:08:5232#include "net/net_buildflags.h"
Ryan Hamiltona3ee93a72018-08-01 22:03:0833#include "net/quic/quic_stream_factory.h"
[email protected]cf4cae32014-05-27 00:39:1034#include "net/socket/next_proto.h"
Bence Béky33a4e432018-12-03 16:17:2335#include "net/socket/websocket_endpoint_lock_manager.h"
Bence Béky94658bf2018-05-11 19:22:5836#include "net/spdy/spdy_session_pool.h"
[email protected]cf4cae32014-05-27 00:39:1037#include "net/ssl/ssl_client_auth_cache.h"
Ryan Hamilton2e003eea2018-05-02 00:24:2938#include "net/third_party/spdy/core/spdy_protocol.h"
[email protected]cf4cae32014-05-27 00:39:1039
40namespace base {
41class Value;
xunjieli9f8c5fb52016-12-07 22:59:3342namespace trace_event {
43class ProcessMemoryDump;
44}
[email protected]cf4cae32014-05-27 00:39:1045}
46
Bence Béky33a4e432018-12-03 16:17:2347namespace quic {
48class QuicClock;
49} // namespace quic
50
[email protected]cf4cae32014-05-27 00:39:1051namespace net {
52
estark6f9b3d82016-01-12 21:37:0553class CTPolicyEnforcer;
[email protected]cf4cae32014-05-27 00:39:1054class CertVerifier;
[email protected]6b8a3c742014-07-25 00:25:3555class ChannelIDService;
[email protected]cf4cae32014-05-27 00:39:1056class ClientSocketFactory;
57class ClientSocketPoolManager;
58class CTVerifier;
59class HostResolver;
[email protected]cf4cae32014-05-27 00:39:1060class HttpAuthHandlerFactory;
61class HttpNetworkSessionPeer;
62class HttpProxyClientSocketPool;
63class HttpResponseBodyDrainer;
64class HttpServerProperties;
65class NetLog;
Douglas Creager3cb042052018-11-06 23:08:5266#if BUILDFLAG(ENABLE_REPORTING)
67class NetworkErrorLoggingService;
68#endif
Tarun Bansaled2b20b642018-10-15 19:51:3269class NetworkQualityEstimator;
Wojciech Dzierżanowski1f823562019-01-18 11:26:0070class ProxyDelegate;
Lily Houghton8c2f97d2018-01-22 05:06:5971class ProxyResolutionService;
Matt Menkee8648fa2019-01-17 16:47:0772class ProxyServer;
73class QuicCryptoClientStreamFactory;
Douglas Creager134b52e2018-11-09 18:00:1474#if BUILDFLAG(ENABLE_REPORTING)
75class ReportingService;
76#endif
tbansalba8f4112015-09-03 21:57:1977class SocketPerformanceWatcherFactory;
[email protected]cf4cae32014-05-27 00:39:1078class SOCKSClientSocketPool;
79class SSLClientSocketPool;
80class SSLConfigService;
81class TransportClientSocketPool;
82class TransportSecurityState;
83
bnc3171a2432016-12-28 18:40:2684// Specifies the maximum HPACK dynamic table size the server is allowed to set.
85const uint32_t kSpdyMaxHeaderTableSize = 64 * 1024;
86
87// Specifies the maximum concurrent streams server could send (via push).
88const uint32_t kSpdyMaxConcurrentPushedStreams = 1000;
89
[email protected]cf4cae32014-05-27 00:39:1090// This class holds session objects used by HttpNetworkTransaction objects.
Takashi Sakamoto420ec97c2018-09-26 09:27:5991class NET_EXPORT HttpNetworkSession {
[email protected]cf4cae32014-05-27 00:39:1092 public:
mmenke6ddfbea2017-05-31 21:48:4193 // Self-contained structure with all the simple configuration options
94 // supported by the HttpNetworkSession.
[email protected]cf4cae32014-05-27 00:39:1095 struct NET_EXPORT Params {
96 Params();
vmpstracd23b72016-02-26 21:08:5597 Params(const Params& other);
[email protected]cf4cae32014-05-27 00:39:1098 ~Params();
99
zhongyid7dd2db12017-04-14 17:01:25100 bool enable_server_push_cancellation;
mmenke0d700dd82017-05-26 20:36:11101 HostMappingRules host_mapping_rules;
[email protected]cf4cae32014-05-27 00:39:10102 bool ignore_certificate_errors;
Avi Drissman13fc8932015-12-20 04:40:46103 uint16_t testing_fixed_http_port;
104 uint16_t testing_fixed_https_port;
rch1546ccd2017-04-20 02:14:23105 bool enable_user_alternate_protocol_ports;
[email protected]cf4cae32014-05-27 00:39:10106
rchd502a302015-10-16 03:57:21107 // Use SPDY ping frames to test for connection health after idle.
[email protected]cf4cae32014-05-27 00:39:10108 bool enable_spdy_ping_based_connection_checking;
bnc3f0118e2016-02-02 15:42:22109 bool enable_http2;
bnc8f0f3b62015-04-08 04:37:23110 size_t spdy_session_max_recv_window_size;
bnc3171a2432016-12-28 18:40:26111 // HTTP/2 connection settings.
112 // Unknown settings will still be sent to the server.
Bence Béky6a070bcd2018-09-06 15:02:43113 // Might contain unknown setting identifiers from a predefined set that
114 // servers are supposed to ignore, see
115 // https://tools.ietf.org/html/draft-bishop-httpbis-grease-00.
116 // The same setting will be sent on every connection to prevent the retry
117 // logic from hiding broken servers.
Ryan Hamilton0239aac2018-05-19 00:03:13118 spdy::SettingsMap http2_settings;
Bence Béky6a070bcd2018-09-06 15:02:43119 // If set, an HTTP/2 frame with a reserved frame type will be sent after
120 // every HEADERS and SETTINGS frame. See
121 // https://tools.ietf.org/html/draft-bishop-httpbis-grease-00.
122 // The same frame will be sent out on all connections to prevent the retry
123 // logic from hiding broken servers.
124 base::Optional<SpdySessionPool::GreasedHttp2Frame> greased_http2_frame;
rchd502a302015-10-16 03:57:21125 // Source of time for SPDY connections.
[email protected]cf4cae32014-05-27 00:39:10126 SpdySessionPool::TimeFunc time_func;
bnca86731e2017-04-17 12:31:28127 // Whether to enable HTTP/2 Alt-Svc entries.
128 bool enable_http2_alternative_service;
Bence Béky58b423222018-01-24 15:16:54129 // Whether to enable Websocket over HTTP/2.
130 bool enable_websocket_over_http2;
[email protected]cf4cae32014-05-27 00:39:10131
rchd502a302015-10-16 03:57:21132 // Enables QUIC support.
[email protected]cf4cae32014-05-27 00:39:10133 bool enable_quic;
rch1546ccd2017-04-20 02:14:23134
Ryan Hamilton4cbcbf12018-12-15 05:16:14135 // If true, HTTPS URLs can be sent to QUIC proxies.
136 bool enable_quic_proxies_for_https_urls;
137
rch1546ccd2017-04-20 02:14:23138 // QUIC runtime configuration options.
139
140 // Versions of QUIC which may be used.
Ryan Hamilton8d9ee76e2018-05-29 23:52:52141 quic::QuicTransportVersionVector quic_supported_versions;
rch1546ccd2017-04-20 02:14:23142 // User agent description to send in the QUIC handshake.
143 std::string quic_user_agent_id;
144 // Limit on the size of QUIC packets.
145 size_t quic_max_packet_length;
rch1546ccd2017-04-20 02:14:23146 // Maximum number of server configs that are to be stored in
147 // HttpServerProperties, instead of the disk cache.
148 size_t quic_max_server_configs_stored_in_properties;
149 // QUIC will be used for all connections in this set.
150 std::set<HostPortPair> origins_to_force_quic_on;
151 // Set of QUIC tags to send in the handshake's connection options.
Ryan Hamilton8d9ee76e2018-05-29 23:52:52152 quic::QuicTagVector quic_connection_options;
Yixin Wang46a425f2017-08-10 23:02:20153 // Set of QUIC tags to send in the handshake's connection options that only
154 // affect the client.
Ryan Hamilton8d9ee76e2018-05-29 23:52:52155 quic::QuicTagVector quic_client_connection_options;
kapishnikov7f8dd1e2018-01-24 06:10:49156 // Enables experimental optimization for receiving data in UDPSocket.
157 bool quic_enable_socket_recv_optimization;
rch1546ccd2017-04-20 02:14:23158
159 // Active QUIC experiments
160
rch9ecde09b2017-04-08 00:18:23161 // Marks a QUIC server broken when a connection blackholes after the
162 // handshake is confirmed.
163 bool mark_quic_broken_when_network_blackholes;
rch2f2991c2017-04-13 19:28:17164 // Retry requests which fail with QUIC_PROTOCOL_ERROR, and mark QUIC
165 // broken if the retry succeeds.
166 bool retry_without_alt_svc_on_quic_errors;
Yixin Wanga9afead2017-10-19 20:23:10167 // If true, alt-svc headers advertising QUIC in IETF format will be
168 // supported.
169 bool support_ietf_format_quic_altsvc;
Jana Iyengar903dec22017-11-28 00:44:23170 // If true, all QUIC sessions are closed when any local IP address changes.
171 bool quic_close_sessions_on_ip_change;
Zhongyi Shi63574b72018-06-01 20:22:25172 // If true, all QUIC sessions are marked as goaway when any local IP address
173 // changes.
174 bool quic_goaway_sessions_on_ip_change;
zhongyi6ba0f4252016-08-23 05:20:04175 // Specifies QUIC idle connection state lifetime.
rtenneti41c09992015-11-30 18:24:01176 int quic_idle_connection_timeout_seconds;
zhongyidd1439f62016-09-02 02:02:26177 // Specifies the reduced ping timeout subsequent connections should use when
178 // a connection was timed out with open streams.
179 int quic_reduced_ping_timeout_seconds;
Yixin Wang469da562017-11-15 21:34:58180 // Maximum time the session can be alive before crypto handshake is
181 // finished.
182 int quic_max_time_before_crypto_handshake_seconds;
183 // Maximum idle time before the crypto handshake has completed.
184 int quic_max_idle_time_before_crypto_handshake_seconds;
Zhongyi Shi64795622017-11-20 02:21:49185 // If true, connection migration v2 will be used to migrate existing
186 // sessions to network when the platform indicates that the default network
187 // is changing.
188 bool quic_migrate_sessions_on_network_change_v2;
Zhongyi Shif4683a32017-12-01 00:03:28189 // If true, connection migration v2 may be used to migrate active QUIC
190 // sessions to alternative network if current network connectivity is poor.
191 bool quic_migrate_sessions_early_v2;
Zhongyi Shi8de43832018-08-15 23:40:00192 // If true, a new connection may be kicked off on an alternate network when
193 // a connection fails on the default network before handshake is confirmed.
194 bool quic_retry_on_alternate_network_before_handshake;
Renjiea0cb4a2c2018-09-26 23:37:30195 // If true, the quic stream factory may race connection from stale dns
196 // result with the original dns resolution
197 bool quic_race_stale_dns_on_connection;
Renjiea5722ccf2018-08-10 00:18:49198 // If true, the quic session may mark itself as GOAWAY on path degrading.
199 bool quic_go_away_on_path_degrading;
Zhongyi Shi8b1e43f2017-12-13 20:46:30200 // Maximum time the session could be on the non-default network before
201 // migrates back to default network. Defaults to
202 // kMaxTimeOnNonDefaultNetwork.
Zhongyi Shi73f23ca872017-12-13 18:37:13203 base::TimeDelta quic_max_time_on_non_default_network;
Zhongyi Shiee760762018-08-01 00:54:29204 // Maximum number of migrations to the non-default network on write error
205 // per network for each session.
206 int quic_max_migrations_to_non_default_network_on_write_error;
Zhongyi Shi8b1e43f2017-12-13 20:46:30207 // Maximum number of migrations to the non-default network on path
208 // degrading per network for each session.
209 int quic_max_migrations_to_non_default_network_on_path_degrading;
jri217455a12016-07-13 20:15:09210 // If true, allows migration of QUIC connections to a server-specified
211 // alternate server address.
212 bool quic_allow_server_migration;
Ryan Hamiltonc84473f2017-11-23 03:18:34213 // If true, allows QUIC to use alternative services with a different
214 // hostname from the origin.
215 bool quic_allow_remote_alt_svc;
xunjieli888c29922016-03-18 21:05:09216 // If true, bidirectional streams over QUIC will be disabled.
217 bool quic_disable_bidirectional_streams;
ckrasicda193a82016-07-09 00:39:36218 // If true, enable force HOL blocking. For measurement purposes.
219 bool quic_force_hol_blocking;
rtennetid073dd22016-08-04 01:58:33220 // If true, race cert verification with host resolution.
221 bool quic_race_cert_verification;
rchd6163f32017-01-30 23:50:38222 // If true, estimate the initial RTT for QUIC connections based on network.
223 bool quic_estimate_initial_rtt;
Yixin Wang079ad542018-01-11 04:06:05224 // If true, client headers will include HTTP/2 stream dependency info
225 // derived from the request priority.
226 bool quic_headers_include_h2_stream_dependency;
Yixin Wang10f477ed2017-11-21 04:20:20227 // If non-empty, QUIC will only be spoken to hosts in this list.
228 base::flat_set<std::string> quic_host_whitelist;
xunjieli888c29922016-03-18 21:05:09229
Nick Harper1e5757d42018-05-02 23:08:57230 // Enable Channel ID. Channel ID is being deprecated.
231 bool enable_channel_id;
mmenkea7da6da2016-09-01 21:56:52232
233 // Enable HTTP/0.9 for HTTP/HTTPS on ports other than the default one for
234 // each protocol.
235 bool http_09_on_non_default_ports_enabled;
yucliu48f235d2018-01-11 00:59:55236
237 // If true, idle sockets won't be closed when memory pressure happens.
238 bool disable_idle_sockets_close_on_memory_pressure;
[email protected]cf4cae32014-05-27 00:39:10239 };
240
mmenke6ddfbea2017-05-31 21:48:41241 // Structure with pointers to the dependencies of the HttpNetworkSession.
242 // These objects must all outlive the HttpNetworkSession.
243 struct NET_EXPORT Context {
244 Context();
245 Context(const Context& other);
246 ~Context();
247
248 ClientSocketFactory* client_socket_factory;
249 HostResolver* host_resolver;
250 CertVerifier* cert_verifier;
251 ChannelIDService* channel_id_service;
252 TransportSecurityState* transport_security_state;
253 CTVerifier* cert_transparency_verifier;
254 CTPolicyEnforcer* ct_policy_enforcer;
Lily Houghton8c2f97d2018-01-22 05:06:59255 ProxyResolutionService* proxy_resolution_service;
Wojciech Dzierżanowski1f823562019-01-18 11:26:00256 ProxyDelegate* proxy_delegate;
mmenke6ddfbea2017-05-31 21:48:41257 SSLConfigService* ssl_config_service;
258 HttpAuthHandlerFactory* http_auth_handler_factory;
259 HttpServerProperties* http_server_properties;
260 NetLog* net_log;
261 SocketPerformanceWatcherFactory* socket_performance_watcher_factory;
Tarun Bansaled2b20b642018-10-15 19:51:32262 NetworkQualityEstimator* network_quality_estimator;
Douglas Creager3cb042052018-11-06 23:08:52263#if BUILDFLAG(ENABLE_REPORTING)
Douglas Creager134b52e2018-11-09 18:00:14264 ReportingService* reporting_service;
Douglas Creager3cb042052018-11-06 23:08:52265 NetworkErrorLoggingService* network_error_logging_service;
266#endif
mmenke6ddfbea2017-05-31 21:48:41267
268 // Source of time for QUIC connections.
Ryan Hamilton8d9ee76e2018-05-29 23:52:52269 quic::QuicClock* quic_clock;
mmenke6ddfbea2017-05-31 21:48:41270 // Source of entropy for QUIC connections.
Ryan Hamilton8d9ee76e2018-05-29 23:52:52271 quic::QuicRandom* quic_random;
mmenke6ddfbea2017-05-31 21:48:41272 // Optional factory to use for creating QuicCryptoClientStreams.
273 QuicCryptoClientStreamFactory* quic_crypto_client_stream_factory;
mmenke6ddfbea2017-05-31 21:48:41274 };
275
[email protected]cf4cae32014-05-27 00:39:10276 enum SocketPoolType {
277 NORMAL_SOCKET_POOL,
278 WEBSOCKET_SOCKET_POOL,
279 NUM_SOCKET_POOL_TYPES
280 };
281
mmenke6ddfbea2017-05-31 21:48:41282 HttpNetworkSession(const Params& params, const Context& context);
Takashi Sakamoto420ec97c2018-09-26 09:27:59283 ~HttpNetworkSession();
[email protected]cf4cae32014-05-27 00:39:10284
285 HttpAuthCache* http_auth_cache() { return &http_auth_cache_; }
286 SSLClientAuthCache* ssl_client_auth_cache() {
287 return &ssl_client_auth_cache_;
288 }
289
avifceb32f62016-10-07 16:30:52290 void AddResponseDrainer(std::unique_ptr<HttpResponseBodyDrainer> drainer);
[email protected]cf4cae32014-05-27 00:39:10291
avifceb32f62016-10-07 16:30:52292 // Removes the drainer from the session. Does not dispose of it.
[email protected]cf4cae32014-05-27 00:39:10293 void RemoveResponseDrainer(HttpResponseBodyDrainer* drainer);
294
295 TransportClientSocketPool* GetTransportSocketPool(SocketPoolType pool_type);
296 SSLClientSocketPool* GetSSLSocketPool(SocketPoolType pool_type);
297 SOCKSClientSocketPool* GetSocketPoolForSOCKSProxy(
298 SocketPoolType pool_type,
Matt Menkee8648fa2019-01-17 16:47:07299 const ProxyServer& socks_proxy);
300 HttpProxyClientSocketPool* GetSocketPoolForHTTPLikeProxy(
[email protected]cf4cae32014-05-27 00:39:10301 SocketPoolType pool_type,
Matt Menkee8648fa2019-01-17 16:47:07302 const ProxyServer& http_proxy);
[email protected]cf4cae32014-05-27 00:39:10303 SSLClientSocketPool* GetSocketPoolForSSLWithProxy(
304 SocketPoolType pool_type,
Matt Menkee8648fa2019-01-17 16:47:07305 const ProxyServer& proxy_server);
[email protected]cf4cae32014-05-27 00:39:10306
307 CertVerifier* cert_verifier() { return cert_verifier_; }
Lily Houghton8c2f97d2018-01-22 05:06:59308 ProxyResolutionService* proxy_resolution_service() {
309 return proxy_resolution_service_;
310 }
Ryan Sleevib8449e02018-07-15 04:31:07311 SSLConfigService* ssl_config_service() { return ssl_config_service_; }
Bence Békyda280c62018-04-12 15:08:37312 WebSocketEndpointLockManager* websocket_endpoint_lock_manager() {
Bence Béky33a4e432018-12-03 16:17:23313 return &websocket_endpoint_lock_manager_;
Bence Békyda280c62018-04-12 15:08:37314 }
[email protected]cf4cae32014-05-27 00:39:10315 SpdySessionPool* spdy_session_pool() { return &spdy_session_pool_; }
316 QuicStreamFactory* quic_stream_factory() { return &quic_stream_factory_; }
317 HttpAuthHandlerFactory* http_auth_handler_factory() {
318 return http_auth_handler_factory_;
319 }
bnc525e175a2016-06-20 12:36:40320 HttpServerProperties* http_server_properties() {
[email protected]cf4cae32014-05-27 00:39:10321 return http_server_properties_;
322 }
323 HttpStreamFactory* http_stream_factory() {
324 return http_stream_factory_.get();
325 }
[email protected]cf4cae32014-05-27 00:39:10326 NetLog* net_log() {
327 return net_log_;
328 }
Douglas Creager3cb042052018-11-06 23:08:52329#if BUILDFLAG(ENABLE_REPORTING)
Douglas Creager134b52e2018-11-09 18:00:14330 ReportingService* reporting_service() const { return reporting_service_; }
Douglas Creager3cb042052018-11-06 23:08:52331 NetworkErrorLoggingService* network_error_logging_service() const {
332 return network_error_logging_service_;
333 }
334#endif
[email protected]cf4cae32014-05-27 00:39:10335
payal.pandey62a400292015-05-28 09:29:54336 // Creates a Value summary of the state of the socket pools.
danakj1fd259a02016-04-16 03:17:09337 std::unique_ptr<base::Value> SocketPoolInfoToValue() const;
[email protected]cf4cae32014-05-27 00:39:10338
payal.pandey91cb2312015-05-27 07:41:51339 // Creates a Value summary of the state of the SPDY sessions.
danakj1fd259a02016-04-16 03:17:09340 std::unique_ptr<base::Value> SpdySessionPoolInfoToValue() const;
[email protected]cf4cae32014-05-27 00:39:10341
342 // Creates a Value summary of the state of the QUIC sessions and
payal.pandeya18956a2015-05-27 05:57:55343 // configuration.
danakj1fd259a02016-04-16 03:17:09344 std::unique_ptr<base::Value> QuicInfoToValue() const;
[email protected]cf4cae32014-05-27 00:39:10345
346 void CloseAllConnections();
347 void CloseIdleConnections();
348
349 // Returns the original Params used to construct this session.
350 const Params& params() const { return params_; }
mmenke6ddfbea2017-05-31 21:48:41351 // Returns the original Context used to construct this session.
352 const Context& context() const { return context_; }
[email protected]cf4cae32014-05-27 00:39:10353
bnc3472afd2016-11-17 15:27:21354 bool IsProtocolEnabled(NextProto protocol) const;
[email protected]cf4cae32014-05-27 00:39:10355
zhongyiaf257542016-12-19 03:36:01356 void SetServerPushDelegate(std::unique_ptr<ServerPushDelegate> push_delegate);
357
bnc1f295372015-10-21 23:24:22358 // Populates |*alpn_protos| with protocols to be used with ALPN.
359 void GetAlpnProtos(NextProtoVector* alpn_protos) const;
360
nharper8cdb0fb2016-04-22 21:34:59361 // Populates |server_config| and |proxy_config| based on this session and
362 // |request|.
363 void GetSSLConfig(const HttpRequestInfo& request,
364 SSLConfig* server_config,
365 SSLConfig* proxy_config) const;
366
xunjieli9f8c5fb52016-12-07 22:59:33367 // Dumps memory allocation stats. |parent_dump_absolute_name| is the name
368 // used by the parent MemoryAllocatorDump in the memory dump hierarchy.
369 void DumpMemoryStats(base::trace_event::ProcessMemoryDump* pmd,
370 const std::string& parent_absolute_name) const;
371
pmarko6ab8be242017-01-11 11:02:55372 // Evaluates if QUIC is enabled for new streams.
373 bool IsQuicEnabled() const;
374
375 // Disable QUIC for new streams.
376 void DisableQuic();
377
[email protected]cf4cae32014-05-27 00:39:10378 private:
[email protected]cf4cae32014-05-27 00:39:10379 friend class HttpNetworkSessionPeer;
380
[email protected]cf4cae32014-05-27 00:39:10381 ClientSocketPoolManager* GetSocketPoolManager(SocketPoolType pool_type);
382
maksim.sisov0adf8592016-07-15 06:25:56383 // Flush sockets on low memory notifications callback.
384 void OnMemoryPressure(
385 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level);
386
[email protected]cf4cae32014-05-27 00:39:10387 NetLog* const net_log_;
bnc525e175a2016-06-20 12:36:40388 HttpServerProperties* const http_server_properties_;
[email protected]cf4cae32014-05-27 00:39:10389 CertVerifier* const cert_verifier_;
390 HttpAuthHandlerFactory* const http_auth_handler_factory_;
391
Douglas Creager3cb042052018-11-06 23:08:52392#if BUILDFLAG(ENABLE_REPORTING)
Douglas Creager134b52e2018-11-09 18:00:14393 ReportingService* const reporting_service_;
Douglas Creager3cb042052018-11-06 23:08:52394 NetworkErrorLoggingService* const network_error_logging_service_;
395#endif
Bence Békybf1c67f22018-04-12 09:26:26396 ProxyResolutionService* const proxy_resolution_service_;
Ryan Sleevib8449e02018-07-15 04:31:07397 SSLConfigService* const ssl_config_service_;
[email protected]cf4cae32014-05-27 00:39:10398
399 HttpAuthCache http_auth_cache_;
400 SSLClientAuthCache ssl_client_auth_cache_;
Bence Béky33a4e432018-12-03 16:17:23401 WebSocketEndpointLockManager websocket_endpoint_lock_manager_;
danakj1fd259a02016-04-16 03:17:09402 std::unique_ptr<ClientSocketPoolManager> normal_socket_pool_manager_;
403 std::unique_ptr<ClientSocketPoolManager> websocket_socket_pool_manager_;
zhongyiaf257542016-12-19 03:36:01404 std::unique_ptr<ServerPushDelegate> push_delegate_;
[email protected]cf4cae32014-05-27 00:39:10405 QuicStreamFactory quic_stream_factory_;
406 SpdySessionPool spdy_session_pool_;
danakj1fd259a02016-04-16 03:17:09407 std::unique_ptr<HttpStreamFactory> http_stream_factory_;
avifceb32f62016-10-07 16:30:52408 std::map<HttpResponseBodyDrainer*, std::unique_ptr<HttpResponseBodyDrainer>>
409 response_drainers_;
bnc0d23cf42014-12-11 14:09:46410 NextProtoVector next_protos_;
[email protected]cf4cae32014-05-27 00:39:10411
412 Params params_;
mmenke6ddfbea2017-05-31 21:48:41413 Context context_;
maksim.sisov0adf8592016-07-15 06:25:56414
415 std::unique_ptr<base::MemoryPressureListener> memory_pressure_listener_;
gab47aa7da2017-06-02 16:09:43416
417 THREAD_CHECKER(thread_checker_);
[email protected]cf4cae32014-05-27 00:39:10418};
419
420} // namespace net
421
422#endif // NET_HTTP_HTTP_NETWORK_SESSION_H_