#include "net/socket/connect_job_params_factory.h"
#include <optional>
#include <vector>
#include "base/check.h"
#include "base/containers/flat_set.h"
#include "base/feature_list.h"
#include "base/memory/scoped_refptr.h"
#include "net/base/features.h"
#include "net/base/host_port_pair.h"
#include "net/base/network_anonymization_key.h"
#include "net/base/privacy_mode.h"
#include "net/base/proxy_chain.h"
#include "net/base/proxy_server.h"
#include "net/base/request_priority.h"
#include "net/dns/public/secure_dns_policy.h"
#include "net/http/http_proxy_connect_job.h"
#include "net/socket/connect_job_params.h"
#include "net/socket/next_proto.h"
#include "net/socket/socket_tag.h"
#include "net/socket/socks_connect_job.h"
#include "net/socket/ssl_connect_job.h"
#include "net/socket/transport_connect_job.h"
#include "net/ssl/ssl_config.h"
#include "net/traffic_annotation/network_traffic_annotation.h"
#include "third_party/abseil-cpp/absl/types/variant.h"
#include "url/gurl.h"
#include "url/scheme_host_port.h"
namespace net {
namespace {
void ConfigureAlpn(const ConnectJobFactory::Endpoint& endpoint,
ConnectJobFactory::AlpnMode alpn_mode,
const NetworkAnonymizationKey& network_anonymization_key,
const CommonConnectJobParams& common_connect_job_params,
SSLConfig& ssl_config,
bool renego_allowed) { … }
base::flat_set<std::string> SupportedProtocolsFromSSLConfig(
const SSLConfig& config) { … }
HostPortPair ToHostPortPair(const ConnectJobFactory::Endpoint& endpoint) { … }
TransportSocketParams::Endpoint ToTransportEndpoint(
const ConnectJobFactory::Endpoint& endpoint) { … }
bool UsingSsl(const ConnectJobFactory::Endpoint& endpoint) { … }
ConnectJobParams MakeSSLSocketParams(
ConnectJobParams params,
const HostPortPair& host_and_port,
const SSLConfig& ssl_config,
const NetworkAnonymizationKey& network_anonymization_key) { … }
ConnectJobParams CreateProxyParams(
HostPortPair host_port_pair,
bool should_tunnel,
const ConnectJobFactory::Endpoint& endpoint,
const ProxyChain& proxy_chain,
size_t proxy_chain_index,
const std::optional<NetworkTrafficAnnotationTag>& proxy_annotation_tag,
const OnHostResolutionCallback& resolution_callback,
const NetworkAnonymizationKey& endpoint_network_anonymization_key,
SecureDnsPolicy secure_dns_policy,
const CommonConnectJobParams* common_connect_job_params,
const NetworkAnonymizationKey& proxy_dns_network_anonymization_key) { … }
}
ConnectJobParams ConstructConnectJobParams(
const ConnectJobFactory::Endpoint& endpoint,
const ProxyChain& proxy_chain,
const std::optional<NetworkTrafficAnnotationTag>& proxy_annotation_tag,
const std::vector<SSLConfig::CertAndStatus>& allowed_bad_certs,
ConnectJobFactory::AlpnMode alpn_mode,
bool force_tunnel,
PrivacyMode privacy_mode,
const OnHostResolutionCallback& resolution_callback,
const NetworkAnonymizationKey& endpoint_network_anonymization_key,
SecureDnsPolicy secure_dns_policy,
bool disable_cert_network_fetches,
const CommonConnectJobParams* common_connect_job_params,
const NetworkAnonymizationKey& proxy_dns_network_anonymization_key) { … }
}