#include "net/http/http_proxy_client_socket.h"
#include <memory>
#include <utility>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/strings/string_util.h"
#include "base/values.h"
#include "net/base/auth.h"
#include "net/base/host_port_pair.h"
#include "net/base/io_buffer.h"
#include "net/base/proxy_chain.h"
#include "net/base/proxy_delegate.h"
#include "net/http/http_basic_stream.h"
#include "net/http/http_log_util.h"
#include "net/http/http_network_session.h"
#include "net/http/http_request_info.h"
#include "net/http/http_response_headers.h"
#include "net/http/http_stream_parser.h"
#include "net/log/net_log.h"
#include "net/log/net_log_event_type.h"
#include "net/socket/stream_socket.h"
#include "url/gurl.h"
namespace net {
const int HttpProxyClientSocket::kDrainBodyBufferSize;
HttpProxyClientSocket::HttpProxyClientSocket(
std::unique_ptr<StreamSocket> socket,
const std::string& user_agent,
const HostPortPair& endpoint,
const ProxyChain& proxy_chain,
size_t proxy_chain_index,
scoped_refptr<HttpAuthController> http_auth_controller,
ProxyDelegate* proxy_delegate,
const NetworkTrafficAnnotationTag& traffic_annotation)
: … { … }
HttpProxyClientSocket::~HttpProxyClientSocket() { … }
int HttpProxyClientSocket::RestartWithAuth(CompletionOnceCallback callback) { … }
const scoped_refptr<HttpAuthController>&
HttpProxyClientSocket::GetAuthController() const { … }
const HttpResponseInfo* HttpProxyClientSocket::GetConnectResponseInfo() const { … }
int HttpProxyClientSocket::Connect(CompletionOnceCallback callback) { … }
void HttpProxyClientSocket::Disconnect() { … }
bool HttpProxyClientSocket::IsConnected() const { … }
bool HttpProxyClientSocket::IsConnectedAndIdle() const { … }
const NetLogWithSource& HttpProxyClientSocket::NetLog() const { … }
bool HttpProxyClientSocket::WasEverUsed() const { … }
NextProto HttpProxyClientSocket::GetNegotiatedProtocol() const { … }
bool HttpProxyClientSocket::GetSSLInfo(SSLInfo* ssl_info) { … }
int64_t HttpProxyClientSocket::GetTotalReceivedBytes() const { … }
void HttpProxyClientSocket::ApplySocketTag(const SocketTag& tag) { … }
int HttpProxyClientSocket::Read(IOBuffer* buf,
int buf_len,
CompletionOnceCallback callback) { … }
int HttpProxyClientSocket::ReadIfReady(IOBuffer* buf,
int buf_len,
CompletionOnceCallback callback) { … }
int HttpProxyClientSocket::CancelReadIfReady() { … }
int HttpProxyClientSocket::Write(
IOBuffer* buf,
int buf_len,
CompletionOnceCallback callback,
const NetworkTrafficAnnotationTag& traffic_annotation) { … }
int HttpProxyClientSocket::SetReceiveBufferSize(int32_t size) { … }
int HttpProxyClientSocket::SetSendBufferSize(int32_t size) { … }
int HttpProxyClientSocket::GetPeerAddress(IPEndPoint* address) const { … }
int HttpProxyClientSocket::GetLocalAddress(IPEndPoint* address) const { … }
int HttpProxyClientSocket::PrepareForAuthRestart() { … }
int HttpProxyClientSocket::DidDrainBodyForAuthRestart() { … }
void HttpProxyClientSocket::DoCallback(int result) { … }
void HttpProxyClientSocket::OnIOComplete(int result) { … }
int HttpProxyClientSocket::DoLoop(int last_io_result) { … }
int HttpProxyClientSocket::DoGenerateAuthToken() { … }
int HttpProxyClientSocket::DoGenerateAuthTokenComplete(int result) { … }
int HttpProxyClientSocket::DoSendRequest() { … }
int HttpProxyClientSocket::DoSendRequestComplete(int result) { … }
int HttpProxyClientSocket::DoReadHeaders() { … }
int HttpProxyClientSocket::DoReadHeadersComplete(int result) { … }
int HttpProxyClientSocket::DoDrainBody() { … }
int HttpProxyClientSocket::DoDrainBodyComplete(int result) { … }
bool HttpProxyClientSocket::CheckDone() { … }
}