#include "net/spdy/spdy_proxy_client_socket.h"
#include <algorithm>
#include <utility>
#include "base/check_op.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/location.h"
#include "base/notreached.h"
#include "base/strings/string_util.h"
#include "base/task/single_thread_task_runner.h"
#include "base/values.h"
#include "net/base/auth.h"
#include "net/base/io_buffer.h"
#include "net/base/proxy_chain.h"
#include "net/base/proxy_delegate.h"
#include "net/http/http_auth_cache.h"
#include "net/http/http_auth_handler_factory.h"
#include "net/http/http_log_util.h"
#include "net/http/http_request_info.h"
#include "net/http/http_response_headers.h"
#include "net/log/net_log_event_type.h"
#include "net/log/net_log_source_type.h"
#include "net/spdy/spdy_http_utils.h"
#include "net/traffic_annotation/network_traffic_annotation.h"
#include "url/gurl.h"
namespace net {
SpdyProxyClientSocket::SpdyProxyClientSocket(
const base::WeakPtr<SpdyStream>& spdy_stream,
const ProxyChain& proxy_chain,
size_t proxy_chain_index,
const std::string& user_agent,
const HostPortPair& endpoint,
const NetLogWithSource& source_net_log,
scoped_refptr<HttpAuthController> auth_controller,
ProxyDelegate* proxy_delegate)
: … { … }
SpdyProxyClientSocket::~SpdyProxyClientSocket() { … }
const HttpResponseInfo* SpdyProxyClientSocket::GetConnectResponseInfo() const { … }
const scoped_refptr<HttpAuthController>&
SpdyProxyClientSocket::GetAuthController() const { … }
int SpdyProxyClientSocket::RestartWithAuth(CompletionOnceCallback callback) { … }
void SpdyProxyClientSocket::SetStreamPriority(RequestPriority priority) { … }
int SpdyProxyClientSocket::Connect(CompletionOnceCallback callback) { … }
void SpdyProxyClientSocket::Disconnect() { … }
bool SpdyProxyClientSocket::IsConnected() const { … }
bool SpdyProxyClientSocket::IsConnectedAndIdle() const { … }
const NetLogWithSource& SpdyProxyClientSocket::NetLog() const { … }
bool SpdyProxyClientSocket::WasEverUsed() const { … }
NextProto SpdyProxyClientSocket::GetNegotiatedProtocol() const { … }
bool SpdyProxyClientSocket::GetSSLInfo(SSLInfo* ssl_info) { … }
int64_t SpdyProxyClientSocket::GetTotalReceivedBytes() const { … }
void SpdyProxyClientSocket::ApplySocketTag(const SocketTag& tag) { … }
int SpdyProxyClientSocket::Read(IOBuffer* buf,
int buf_len,
CompletionOnceCallback callback) { … }
int SpdyProxyClientSocket::ReadIfReady(IOBuffer* buf,
int buf_len,
CompletionOnceCallback callback) { … }
int SpdyProxyClientSocket::CancelReadIfReady() { … }
size_t SpdyProxyClientSocket::PopulateUserReadBuffer(char* data, size_t len) { … }
int SpdyProxyClientSocket::Write(
IOBuffer* buf,
int buf_len,
CompletionOnceCallback callback,
const NetworkTrafficAnnotationTag& traffic_annotation) { … }
int SpdyProxyClientSocket::SetReceiveBufferSize(int32_t size) { … }
int SpdyProxyClientSocket::SetSendBufferSize(int32_t size) { … }
int SpdyProxyClientSocket::GetPeerAddress(IPEndPoint* address) const { … }
int SpdyProxyClientSocket::GetLocalAddress(IPEndPoint* address) const { … }
void SpdyProxyClientSocket::RunWriteCallback(int result) { … }
void SpdyProxyClientSocket::OnIOComplete(int result) { … }
int SpdyProxyClientSocket::DoLoop(int last_io_result) { … }
int SpdyProxyClientSocket::DoGenerateAuthToken() { … }
int SpdyProxyClientSocket::DoGenerateAuthTokenComplete(int result) { … }
int SpdyProxyClientSocket::DoSendRequest() { … }
int SpdyProxyClientSocket::DoSendRequestComplete(int result) { … }
int SpdyProxyClientSocket::DoReadReplyComplete(int result) { … }
void SpdyProxyClientSocket::OnHeadersSent() { … }
void SpdyProxyClientSocket::OnEarlyHintsReceived(
const quiche::HttpHeaderBlock& headers) { … }
void SpdyProxyClientSocket::OnHeadersReceived(
const quiche::HttpHeaderBlock& response_headers) { … }
void SpdyProxyClientSocket::OnDataReceived(std::unique_ptr<SpdyBuffer> buffer) { … }
void SpdyProxyClientSocket::OnDataSent() { … }
void SpdyProxyClientSocket::OnTrailers(
const quiche::HttpHeaderBlock& trailers) { … }
void SpdyProxyClientSocket::OnClose(int status) { … }
bool SpdyProxyClientSocket::CanGreaseFrameType() const { … }
NetLogSource SpdyProxyClientSocket::source_dependency() const { … }
void SpdyProxyClientSocket::MaybeSendEndStream() { … }
}