#include "net/socket/socks_connect_job.h"
#include <memory>
#include <utility>
#include "base/functional/bind.h"
#include "net/base/net_errors.h"
#include "net/log/net_log_source_type.h"
#include "net/log/net_log_with_source.h"
#include "net/socket/client_socket_factory.h"
#include "net/socket/client_socket_handle.h"
#include "net/socket/connect_job_params.h"
#include "net/socket/socks5_client_socket.h"
#include "net/socket/socks_client_socket.h"
#include "net/socket/transport_connect_job.h"
namespace net {
static constexpr base::TimeDelta kSOCKSConnectJobTimeout = …;
SOCKSSocketParams::SOCKSSocketParams(
ConnectJobParams nested_params,
bool socks_v5,
const HostPortPair& host_port_pair,
const NetworkAnonymizationKey& network_anonymization_key,
const NetworkTrafficAnnotationTag& traffic_annotation)
: … { … }
SOCKSSocketParams::~SOCKSSocketParams() = default;
std::unique_ptr<SOCKSConnectJob> SOCKSConnectJob::Factory::Create(
RequestPriority priority,
const SocketTag& socket_tag,
const CommonConnectJobParams* common_connect_job_params,
scoped_refptr<SOCKSSocketParams> socks_params,
ConnectJob::Delegate* delegate,
const NetLogWithSource* net_log) { … }
SOCKSConnectJob::SOCKSConnectJob(
RequestPriority priority,
const SocketTag& socket_tag,
const CommonConnectJobParams* common_connect_job_params,
scoped_refptr<SOCKSSocketParams> socks_params,
ConnectJob::Delegate* delegate,
const NetLogWithSource* net_log)
: … { … }
SOCKSConnectJob::~SOCKSConnectJob() { … }
LoadState SOCKSConnectJob::GetLoadState() const { … }
bool SOCKSConnectJob::HasEstablishedConnection() const { … }
ResolveErrorInfo SOCKSConnectJob::GetResolveErrorInfo() const { … }
base::TimeDelta SOCKSConnectJob::HandshakeTimeoutForTesting() { … }
void SOCKSConnectJob::OnIOComplete(int result) { … }
void SOCKSConnectJob::OnConnectJobComplete(int result, ConnectJob* job) { … }
void SOCKSConnectJob::OnNeedsProxyAuth(
const HttpResponseInfo& response,
HttpAuthController* auth_controller,
base::OnceClosure restart_with_auth_callback,
ConnectJob* job) { … }
int SOCKSConnectJob::DoLoop(int result) { … }
int SOCKSConnectJob::DoTransportConnect() { … }
int SOCKSConnectJob::DoTransportConnectComplete(int result) { … }
int SOCKSConnectJob::DoSOCKSConnect() { … }
int SOCKSConnectJob::DoSOCKSConnectComplete(int result) { … }
int SOCKSConnectJob::ConnectInternal() { … }
void SOCKSConnectJob::ChangePriorityInternal(RequestPriority priority) { … }
}