blob: 3fe77b24e3601149c99d6ac2fc66c69a7a2179d1 [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;
Lily Houghton8c2f97d2018-01-22 05:06:5970class ProxyResolutionService;
Matt Menkee8648fa2019-01-17 16:47:0771class ProxyServer;
72class QuicCryptoClientStreamFactory;
Douglas Creager134b52e2018-11-09 18:00:1473#if BUILDFLAG(ENABLE_REPORTING)
74class ReportingService;
75#endif
tbansalba8f4112015-09-03 21:57:1976class SocketPerformanceWatcherFactory;
[email protected]cf4cae32014-05-27 00:39:1077class SOCKSClientSocketPool;
78class SSLClientSocketPool;
79class SSLConfigService;
80class TransportClientSocketPool;
81class TransportSecurityState;
[email protected]cf4cae32014-05-27 00:39:1082
bnc3171a2432016-12-28 18:40:2683// Specifies the maximum HPACK dynamic table size the server is allowed to set.
84const uint32_t kSpdyMaxHeaderTableSize = 64 * 1024;
85
86// Specifies the maximum concurrent streams server could send (via push).
87const uint32_t kSpdyMaxConcurrentPushedStreams = 1000;
88
[email protected]cf4cae32014-05-27 00:39:1089// This class holds session objects used by HttpNetworkTransaction objects.
Takashi Sakamoto420ec97c2018-09-26 09:27:5990class NET_EXPORT HttpNetworkSession {
[email protected]cf4cae32014-05-27 00:39:1091 public:
mmenke6ddfbea2017-05-31 21:48:4192 // Self-contained structure with all the simple configuration options
93 // supported by the HttpNetworkSession.
[email protected]cf4cae32014-05-27 00:39:1094 struct NET_EXPORT Params {
95 Params();
vmpstracd23b72016-02-26 21:08:5596 Params(const Params& other);
[email protected]cf4cae32014-05-27 00:39:1097 ~Params();
98
zhongyid7dd2db12017-04-14 17:01:2599 bool enable_server_push_cancellation;
mmenke0d700dd82017-05-26 20:36:11100 HostMappingRules host_mapping_rules;
[email protected]cf4cae32014-05-27 00:39:10101 bool ignore_certificate_errors;
Avi Drissman13fc8932015-12-20 04:40:46102 uint16_t testing_fixed_http_port;
103 uint16_t testing_fixed_https_port;
rch1546ccd2017-04-20 02:14:23104 bool enable_user_alternate_protocol_ports;
[email protected]cf4cae32014-05-27 00:39:10105
rchd502a302015-10-16 03:57:21106 // Use SPDY ping frames to test for connection health after idle.
[email protected]cf4cae32014-05-27 00:39:10107 bool enable_spdy_ping_based_connection_checking;
bnc3f0118e2016-02-02 15:42:22108 bool enable_http2;
bnc8f0f3b62015-04-08 04:37:23109 size_t spdy_session_max_recv_window_size;
bnc3171a2432016-12-28 18:40:26110 // HTTP/2 connection settings.
111 // Unknown settings will still be sent to the server.
Bence Béky6a070bcd2018-09-06 15:02:43112 // Might contain unknown setting identifiers from a predefined set that
113 // servers are supposed to ignore, see
114 // https://tools.ietf.org/html/draft-bishop-httpbis-grease-00.
115 // The same setting will be sent on every connection to prevent the retry
116 // logic from hiding broken servers.
Ryan Hamilton0239aac2018-05-19 00:03:13117 spdy::SettingsMap http2_settings;
Bence Béky6a070bcd2018-09-06 15:02:43118 // If set, an HTTP/2 frame with a reserved frame type will be sent after
119 // every HEADERS and SETTINGS frame. See
120 // https://tools.ietf.org/html/draft-bishop-httpbis-grease-00.
121 // The same frame will be sent out on all connections to prevent the retry
122 // logic from hiding broken servers.
123 base::Optional<SpdySessionPool::GreasedHttp2Frame> greased_http2_frame;
rchd502a302015-10-16 03:57:21124 // Source of time for SPDY connections.
[email protected]cf4cae32014-05-27 00:39:10125 SpdySessionPool::TimeFunc time_func;
bnca86731e2017-04-17 12:31:28126 // Whether to enable HTTP/2 Alt-Svc entries.
127 bool enable_http2_alternative_service;
Bence Béky58b423222018-01-24 15:16:54128 // Whether to enable Websocket over HTTP/2.
129 bool enable_websocket_over_http2;
[email protected]cf4cae32014-05-27 00:39:10130
rchd502a302015-10-16 03:57:21131 // Enables QUIC support.
[email protected]cf4cae32014-05-27 00:39:10132 bool enable_quic;
rch1546ccd2017-04-20 02:14:23133
Ryan Hamilton4cbcbf12018-12-15 05:16:14134 // If true, HTTPS URLs can be sent to QUIC proxies.
135 bool enable_quic_proxies_for_https_urls;
136
rch1546ccd2017-04-20 02:14:23137 // QUIC runtime configuration options.
138
139 // Versions of QUIC which may be used.
Ryan Hamilton8d9ee76e2018-05-29 23:52:52140 quic::QuicTransportVersionVector quic_supported_versions;
rch1546ccd2017-04-20 02:14:23141 // User agent description to send in the QUIC handshake.
142 std::string quic_user_agent_id;
143 // Limit on the size of QUIC packets.
144 size_t quic_max_packet_length;
rch1546ccd2017-04-20 02:14:23145 // Maximum number of server configs that are to be stored in
146 // HttpServerProperties, instead of the disk cache.
147 size_t quic_max_server_configs_stored_in_properties;
148 // QUIC will be used for all connections in this set.
149 std::set<HostPortPair> origins_to_force_quic_on;
150 // Set of QUIC tags to send in the handshake's connection options.
Ryan Hamilton8d9ee76e2018-05-29 23:52:52151 quic::QuicTagVector quic_connection_options;
Yixin Wang46a425f2017-08-10 23:02:20152 // Set of QUIC tags to send in the handshake's connection options that only
153 // affect the client.
Ryan Hamilton8d9ee76e2018-05-29 23:52:52154 quic::QuicTagVector quic_client_connection_options;
kapishnikov7f8dd1e2018-01-24 06:10:49155 // Enables experimental optimization for receiving data in UDPSocket.
156 bool quic_enable_socket_recv_optimization;
rch1546ccd2017-04-20 02:14:23157
158 // Active QUIC experiments
159
rch9ecde09b2017-04-08 00:18:23160 // Marks a QUIC server broken when a connection blackholes after the
161 // handshake is confirmed.
162 bool mark_quic_broken_when_network_blackholes;
rch2f2991c2017-04-13 19:28:17163 // Retry requests which fail with QUIC_PROTOCOL_ERROR, and mark QUIC
164 // broken if the retry succeeds.
165 bool retry_without_alt_svc_on_quic_errors;
Yixin Wanga9afead2017-10-19 20:23:10166 // If true, alt-svc headers advertising QUIC in IETF format will be
167 // supported.
168 bool support_ietf_format_quic_altsvc;
Jana Iyengar903dec22017-11-28 00:44:23169 // If true, all QUIC sessions are closed when any local IP address changes.
170 bool quic_close_sessions_on_ip_change;
Zhongyi Shi63574b72018-06-01 20:22:25171 // If true, all QUIC sessions are marked as goaway when any local IP address
172 // changes.
173 bool quic_goaway_sessions_on_ip_change;
zhongyi6ba0f4252016-08-23 05:20:04174 // Specifies QUIC idle connection state lifetime.
rtenneti41c09992015-11-30 18:24:01175 int quic_idle_connection_timeout_seconds;
zhongyidd1439f62016-09-02 02:02:26176 // Specifies the reduced ping timeout subsequent connections should use when
177 // a connection was timed out with open streams.
178 int quic_reduced_ping_timeout_seconds;
Yixin Wang469da562017-11-15 21:34:58179 // Maximum time the session can be alive before crypto handshake is
180 // finished.
181 int quic_max_time_before_crypto_handshake_seconds;
182 // Maximum idle time before the crypto handshake has completed.
183 int quic_max_idle_time_before_crypto_handshake_seconds;
Zhongyi Shi64795622017-11-20 02:21:49184 // If true, connection migration v2 will be used to migrate existing
185 // sessions to network when the platform indicates that the default network
186 // is changing.
187 bool quic_migrate_sessions_on_network_change_v2;
Zhongyi Shif4683a32017-12-01 00:03:28188 // If true, connection migration v2 may be used to migrate active QUIC
189 // sessions to alternative network if current network connectivity is poor.
190 bool quic_migrate_sessions_early_v2;
Zhongyi Shi8de43832018-08-15 23:40:00191 // If true, a new connection may be kicked off on an alternate network when
192 // a connection fails on the default network before handshake is confirmed.
193 bool quic_retry_on_alternate_network_before_handshake;
Renjiea0cb4a2c2018-09-26 23:37:30194 // If true, the quic stream factory may race connection from stale dns
195 // result with the original dns resolution
196 bool quic_race_stale_dns_on_connection;
Renjiea5722ccf2018-08-10 00:18:49197 // If true, the quic session may mark itself as GOAWAY on path degrading.
198 bool quic_go_away_on_path_degrading;
Zhongyi Shi8b1e43f2017-12-13 20:46:30199 // Maximum time the session could be on the non-default network before
200 // migrates back to default network. Defaults to
201 // kMaxTimeOnNonDefaultNetwork.
Zhongyi Shi73f23ca872017-12-13 18:37:13202 base::TimeDelta quic_max_time_on_non_default_network;
Zhongyi Shiee760762018-08-01 00:54:29203 // Maximum number of migrations to the non-default network on write error
204 // per network for each session.
205 int quic_max_migrations_to_non_default_network_on_write_error;
Zhongyi Shi8b1e43f2017-12-13 20:46:30206 // Maximum number of migrations to the non-default network on path
207 // degrading per network for each session.
208 int quic_max_migrations_to_non_default_network_on_path_degrading;
jri217455a12016-07-13 20:15:09209 // If true, allows migration of QUIC connections to a server-specified
210 // alternate server address.
211 bool quic_allow_server_migration;
Ryan Hamiltonc84473f2017-11-23 03:18:34212 // If true, allows QUIC to use alternative services with a different
213 // hostname from the origin.
214 bool quic_allow_remote_alt_svc;
xunjieli888c29922016-03-18 21:05:09215 // If true, bidirectional streams over QUIC will be disabled.
216 bool quic_disable_bidirectional_streams;
ckrasicda193a82016-07-09 00:39:36217 // If true, enable force HOL blocking. For measurement purposes.
218 bool quic_force_hol_blocking;
rtennetid073dd22016-08-04 01:58:33219 // If true, race cert verification with host resolution.
220 bool quic_race_cert_verification;
rchd6163f32017-01-30 23:50:38221 // If true, estimate the initial RTT for QUIC connections based on network.
222 bool quic_estimate_initial_rtt;
Yixin Wang079ad542018-01-11 04:06:05223 // If true, client headers will include HTTP/2 stream dependency info
224 // derived from the request priority.
225 bool quic_headers_include_h2_stream_dependency;
Yixin Wang10f477ed2017-11-21 04:20:20226 // If non-empty, QUIC will only be spoken to hosts in this list.
227 base::flat_set<std::string> quic_host_whitelist;
xunjieli888c29922016-03-18 21:05:09228
Nick Harper1e5757d42018-05-02 23:08:57229 // Enable Channel ID. Channel ID is being deprecated.
230 bool enable_channel_id;
mmenkea7da6da2016-09-01 21:56:52231
232 // Enable HTTP/0.9 for HTTP/HTTPS on ports other than the default one for
233 // each protocol.
234 bool http_09_on_non_default_ports_enabled;
yucliu48f235d2018-01-11 00:59:55235
236 // If true, idle sockets won't be closed when memory pressure happens.
237 bool disable_idle_sockets_close_on_memory_pressure;
[email protected]cf4cae32014-05-27 00:39:10238 };
239
mmenke6ddfbea2017-05-31 21:48:41240 // Structure with pointers to the dependencies of the HttpNetworkSession.
241 // These objects must all outlive the HttpNetworkSession.
242 struct NET_EXPORT Context {
243 Context();
244 Context(const Context& other);
245 ~Context();
246
247 ClientSocketFactory* client_socket_factory;
248 HostResolver* host_resolver;
249 CertVerifier* cert_verifier;
250 ChannelIDService* channel_id_service;
251 TransportSecurityState* transport_security_state;
252 CTVerifier* cert_transparency_verifier;
253 CTPolicyEnforcer* ct_policy_enforcer;
Lily Houghton8c2f97d2018-01-22 05:06:59254 ProxyResolutionService* proxy_resolution_service;
mmenke6ddfbea2017-05-31 21:48:41255 SSLConfigService* ssl_config_service;
256 HttpAuthHandlerFactory* http_auth_handler_factory;
257 HttpServerProperties* http_server_properties;
258 NetLog* net_log;
259 SocketPerformanceWatcherFactory* socket_performance_watcher_factory;
Tarun Bansaled2b20b642018-10-15 19:51:32260 NetworkQualityEstimator* network_quality_estimator;
Douglas Creager3cb042052018-11-06 23:08:52261#if BUILDFLAG(ENABLE_REPORTING)
Douglas Creager134b52e2018-11-09 18:00:14262 ReportingService* reporting_service;
Douglas Creager3cb042052018-11-06 23:08:52263 NetworkErrorLoggingService* network_error_logging_service;
264#endif
mmenke6ddfbea2017-05-31 21:48:41265
266 // Source of time for QUIC connections.
Ryan Hamilton8d9ee76e2018-05-29 23:52:52267 quic::QuicClock* quic_clock;
mmenke6ddfbea2017-05-31 21:48:41268 // Source of entropy for QUIC connections.
Ryan Hamilton8d9ee76e2018-05-29 23:52:52269 quic::QuicRandom* quic_random;
mmenke6ddfbea2017-05-31 21:48:41270 // Optional factory to use for creating QuicCryptoClientStreams.
271 QuicCryptoClientStreamFactory* quic_crypto_client_stream_factory;
mmenke6ddfbea2017-05-31 21:48:41272 };
273
[email protected]cf4cae32014-05-27 00:39:10274 enum SocketPoolType {
275 NORMAL_SOCKET_POOL,
276 WEBSOCKET_SOCKET_POOL,
277 NUM_SOCKET_POOL_TYPES
278 };
279
mmenke6ddfbea2017-05-31 21:48:41280 HttpNetworkSession(const Params& params, const Context& context);
Takashi Sakamoto420ec97c2018-09-26 09:27:59281 ~HttpNetworkSession();
[email protected]cf4cae32014-05-27 00:39:10282
283 HttpAuthCache* http_auth_cache() { return &http_auth_cache_; }
284 SSLClientAuthCache* ssl_client_auth_cache() {
285 return &ssl_client_auth_cache_;
286 }
287
avifceb32f62016-10-07 16:30:52288 void AddResponseDrainer(std::unique_ptr<HttpResponseBodyDrainer> drainer);
[email protected]cf4cae32014-05-27 00:39:10289
avifceb32f62016-10-07 16:30:52290 // Removes the drainer from the session. Does not dispose of it.
[email protected]cf4cae32014-05-27 00:39:10291 void RemoveResponseDrainer(HttpResponseBodyDrainer* drainer);
292
293 TransportClientSocketPool* GetTransportSocketPool(SocketPoolType pool_type);
294 SSLClientSocketPool* GetSSLSocketPool(SocketPoolType pool_type);
295 SOCKSClientSocketPool* GetSocketPoolForSOCKSProxy(
296 SocketPoolType pool_type,
Matt Menkee8648fa2019-01-17 16:47:07297 const ProxyServer& socks_proxy);
298 HttpProxyClientSocketPool* GetSocketPoolForHTTPLikeProxy(
[email protected]cf4cae32014-05-27 00:39:10299 SocketPoolType pool_type,
Matt Menkee8648fa2019-01-17 16:47:07300 const ProxyServer& http_proxy);
[email protected]cf4cae32014-05-27 00:39:10301 SSLClientSocketPool* GetSocketPoolForSSLWithProxy(
302 SocketPoolType pool_type,
Matt Menkee8648fa2019-01-17 16:47:07303 const ProxyServer& proxy_server);
[email protected]cf4cae32014-05-27 00:39:10304
305 CertVerifier* cert_verifier() { return cert_verifier_; }
Lily Houghton8c2f97d2018-01-22 05:06:59306 ProxyResolutionService* proxy_resolution_service() {
307 return proxy_resolution_service_;
308 }
Ryan Sleevib8449e02018-07-15 04:31:07309 SSLConfigService* ssl_config_service() { return ssl_config_service_; }
Bence Békyda280c62018-04-12 15:08:37310 WebSocketEndpointLockManager* websocket_endpoint_lock_manager() {
Bence Béky33a4e432018-12-03 16:17:23311 return &websocket_endpoint_lock_manager_;
Bence Békyda280c62018-04-12 15:08:37312 }
[email protected]cf4cae32014-05-27 00:39:10313 SpdySessionPool* spdy_session_pool() { return &spdy_session_pool_; }
314 QuicStreamFactory* quic_stream_factory() { return &quic_stream_factory_; }
315 HttpAuthHandlerFactory* http_auth_handler_factory() {
316 return http_auth_handler_factory_;
317 }
bnc525e175a2016-06-20 12:36:40318 HttpServerProperties* http_server_properties() {
[email protected]cf4cae32014-05-27 00:39:10319 return http_server_properties_;
320 }
321 HttpStreamFactory* http_stream_factory() {
322 return http_stream_factory_.get();
323 }
[email protected]cf4cae32014-05-27 00:39:10324 NetLog* net_log() {
325 return net_log_;
326 }
Douglas Creager3cb042052018-11-06 23:08:52327#if BUILDFLAG(ENABLE_REPORTING)
Douglas Creager134b52e2018-11-09 18:00:14328 ReportingService* reporting_service() const { return reporting_service_; }
Douglas Creager3cb042052018-11-06 23:08:52329 NetworkErrorLoggingService* network_error_logging_service() const {
330 return network_error_logging_service_;
331 }
332#endif
[email protected]cf4cae32014-05-27 00:39:10333
payal.pandey62a400292015-05-28 09:29:54334 // Creates a Value summary of the state of the socket pools.
danakj1fd259a02016-04-16 03:17:09335 std::unique_ptr<base::Value> SocketPoolInfoToValue() const;
[email protected]cf4cae32014-05-27 00:39:10336
payal.pandey91cb2312015-05-27 07:41:51337 // Creates a Value summary of the state of the SPDY sessions.
danakj1fd259a02016-04-16 03:17:09338 std::unique_ptr<base::Value> SpdySessionPoolInfoToValue() const;
[email protected]cf4cae32014-05-27 00:39:10339
340 // Creates a Value summary of the state of the QUIC sessions and
payal.pandeya18956a2015-05-27 05:57:55341 // configuration.
danakj1fd259a02016-04-16 03:17:09342 std::unique_ptr<base::Value> QuicInfoToValue() const;
[email protected]cf4cae32014-05-27 00:39:10343
344 void CloseAllConnections();
345 void CloseIdleConnections();
346
347 // Returns the original Params used to construct this session.
348 const Params& params() const { return params_; }
mmenke6ddfbea2017-05-31 21:48:41349 // Returns the original Context used to construct this session.
350 const Context& context() const { return context_; }
[email protected]cf4cae32014-05-27 00:39:10351
bnc3472afd2016-11-17 15:27:21352 bool IsProtocolEnabled(NextProto protocol) const;
[email protected]cf4cae32014-05-27 00:39:10353
zhongyiaf257542016-12-19 03:36:01354 void SetServerPushDelegate(std::unique_ptr<ServerPushDelegate> push_delegate);
355
bnc1f295372015-10-21 23:24:22356 // Populates |*alpn_protos| with protocols to be used with ALPN.
357 void GetAlpnProtos(NextProtoVector* alpn_protos) const;
358
nharper8cdb0fb2016-04-22 21:34:59359 // Populates |server_config| and |proxy_config| based on this session and
360 // |request|.
361 void GetSSLConfig(const HttpRequestInfo& request,
362 SSLConfig* server_config,
363 SSLConfig* proxy_config) const;
364
xunjieli9f8c5fb52016-12-07 22:59:33365 // Dumps memory allocation stats. |parent_dump_absolute_name| is the name
366 // used by the parent MemoryAllocatorDump in the memory dump hierarchy.
367 void DumpMemoryStats(base::trace_event::ProcessMemoryDump* pmd,
368 const std::string& parent_absolute_name) const;
369
pmarko6ab8be242017-01-11 11:02:55370 // Evaluates if QUIC is enabled for new streams.
371 bool IsQuicEnabled() const;
372
373 // Disable QUIC for new streams.
374 void DisableQuic();
375
[email protected]cf4cae32014-05-27 00:39:10376 private:
[email protected]cf4cae32014-05-27 00:39:10377 friend class HttpNetworkSessionPeer;
378
[email protected]cf4cae32014-05-27 00:39:10379 ClientSocketPoolManager* GetSocketPoolManager(SocketPoolType pool_type);
380
maksim.sisov0adf8592016-07-15 06:25:56381 // Flush sockets on low memory notifications callback.
382 void OnMemoryPressure(
383 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level);
384
[email protected]cf4cae32014-05-27 00:39:10385 NetLog* const net_log_;
bnc525e175a2016-06-20 12:36:40386 HttpServerProperties* const http_server_properties_;
[email protected]cf4cae32014-05-27 00:39:10387 CertVerifier* const cert_verifier_;
388 HttpAuthHandlerFactory* const http_auth_handler_factory_;
389
Douglas Creager3cb042052018-11-06 23:08:52390#if BUILDFLAG(ENABLE_REPORTING)
Douglas Creager134b52e2018-11-09 18:00:14391 ReportingService* const reporting_service_;
Douglas Creager3cb042052018-11-06 23:08:52392 NetworkErrorLoggingService* const network_error_logging_service_;
393#endif
Bence Békybf1c67f22018-04-12 09:26:26394 ProxyResolutionService* const proxy_resolution_service_;
Ryan Sleevib8449e02018-07-15 04:31:07395 SSLConfigService* const ssl_config_service_;
[email protected]cf4cae32014-05-27 00:39:10396
397 HttpAuthCache http_auth_cache_;
398 SSLClientAuthCache ssl_client_auth_cache_;
Bence Béky33a4e432018-12-03 16:17:23399 WebSocketEndpointLockManager websocket_endpoint_lock_manager_;
danakj1fd259a02016-04-16 03:17:09400 std::unique_ptr<ClientSocketPoolManager> normal_socket_pool_manager_;
401 std::unique_ptr<ClientSocketPoolManager> websocket_socket_pool_manager_;
zhongyiaf257542016-12-19 03:36:01402 std::unique_ptr<ServerPushDelegate> push_delegate_;
[email protected]cf4cae32014-05-27 00:39:10403 QuicStreamFactory quic_stream_factory_;
404 SpdySessionPool spdy_session_pool_;
danakj1fd259a02016-04-16 03:17:09405 std::unique_ptr<HttpStreamFactory> http_stream_factory_;
avifceb32f62016-10-07 16:30:52406 std::map<HttpResponseBodyDrainer*, std::unique_ptr<HttpResponseBodyDrainer>>
407 response_drainers_;
bnc0d23cf42014-12-11 14:09:46408 NextProtoVector next_protos_;
[email protected]cf4cae32014-05-27 00:39:10409
410 Params params_;
mmenke6ddfbea2017-05-31 21:48:41411 Context context_;
maksim.sisov0adf8592016-07-15 06:25:56412
413 std::unique_ptr<base::MemoryPressureListener> memory_pressure_listener_;
gab47aa7da2017-06-02 16:09:43414
415 THREAD_CHECKER(thread_checker_);
[email protected]cf4cae32014-05-27 00:39:10416};
417
418} // namespace net
419
420#endif // NET_HTTP_HTTP_NETWORK_SESSION_H_