#include "net/http/http_network_session.h"
#include <inttypes.h>
#include <utility>
#include "base/atomic_sequence_num.h"
#include "base/check_op.h"
#include "base/compiler_specific.h"
#include "base/containers/contains.h"
#include "base/feature_list.h"
#include "base/notreached.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/values.h"
#include "build/build_config.h"
#include "net/base/features.h"
#include "net/dns/host_resolver.h"
#include "net/http/http_auth_handler_factory.h"
#include "net/http/http_response_body_drainer.h"
#include "net/http/http_stream_factory.h"
#include "net/http/http_stream_pool.h"
#include "net/http/url_security_manager.h"
#include "net/proxy_resolution/proxy_resolution_service.h"
#include "net/quic/platform/impl/quic_chromium_clock.h"
#include "net/quic/quic_crypto_client_stream_factory.h"
#include "net/quic/quic_session_pool.h"
#include "net/socket/client_socket_factory.h"
#include "net/socket/client_socket_pool_manager_impl.h"
#include "net/socket/next_proto.h"
#include "net/socket/ssl_client_socket.h"
#include "net/spdy/spdy_session.h"
#include "net/spdy/spdy_session_pool.h"
#include "net/third_party/quiche/src/quiche/quic/core/crypto/quic_random.h"
#include "net/third_party/quiche/src/quiche/quic/core/quic_packets.h"
#include "net/third_party/quiche/src/quiche/quic/core/quic_tag.h"
#include "net/third_party/quiche/src/quiche/quic/core/quic_utils.h"
#include "url/scheme_host_port.h"
namespace net {
const int32_t kSpdySessionMaxRecvWindowSize = …;
const int32_t kSpdyStreamMaxRecvWindowSize = …;
const uint32_t kSpdyDisablePush = …;
namespace {
spdy::SettingsMap AddDefaultHttp2Settings(spdy::SettingsMap http2_settings) { … }
bool OriginToForceQuicOnInternal(const QuicParams& quic_params,
const url::SchemeHostPort& destination) { … }
}
HttpNetworkSessionParams::HttpNetworkSessionParams()
: … { … }
HttpNetworkSessionParams::HttpNetworkSessionParams(
const HttpNetworkSessionParams& other) = default;
HttpNetworkSessionParams::~HttpNetworkSessionParams() = default;
HttpNetworkSessionContext::HttpNetworkSessionContext()
: … { … }
HttpNetworkSessionContext::HttpNetworkSessionContext(
const HttpNetworkSessionContext& other) = default;
HttpNetworkSessionContext::~HttpNetworkSessionContext() = default;
HttpNetworkSession::HttpNetworkSession(const HttpNetworkSessionParams& params,
const HttpNetworkSessionContext& context)
: … { … }
HttpNetworkSession::~HttpNetworkSession() { … }
void HttpNetworkSession::StartResponseDrainer(
std::unique_ptr<HttpResponseBodyDrainer> drainer) { … }
void HttpNetworkSession::RemoveResponseDrainer(
HttpResponseBodyDrainer* drainer) { … }
ClientSocketPool* HttpNetworkSession::GetSocketPool(
SocketPoolType pool_type,
const ProxyChain& proxy_chain) { … }
base::Value HttpNetworkSession::SocketPoolInfoToValue() const { … }
std::unique_ptr<base::Value> HttpNetworkSession::SpdySessionPoolInfoToValue()
const { … }
base::Value HttpNetworkSession::QuicInfoToValue() const { … }
void HttpNetworkSession::CloseAllConnections(int net_error,
const char* net_log_reason_utf8) { … }
void HttpNetworkSession::CloseIdleConnections(const char* net_log_reason_utf8) { … }
bool HttpNetworkSession::IsQuicEnabled() const { … }
void HttpNetworkSession::DisableQuic() { … }
bool HttpNetworkSession::ShouldForceQuic(const url::SchemeHostPort& destination,
const ProxyInfo& proxy_info,
bool is_websocket) { … }
void HttpNetworkSession::IgnoreCertificateErrorsForTesting() { … }
void HttpNetworkSession::ClearSSLSessionCache() { … }
CommonConnectJobParams HttpNetworkSession::CreateCommonConnectJobParams(
bool for_websockets) { … }
ClientSocketPoolManager* HttpNetworkSession::GetSocketPoolManager(
SocketPoolType pool_type) { … }
void HttpNetworkSession::OnMemoryPressure(
base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level) { … }
}