#include "services/network/throttling/throttling_network_transaction.h"
#include <memory>
#include <utility>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/time/time.h"
#include "net/base/load_timing_info.h"
#include "net/base/net_errors.h"
#include "net/http/http_network_transaction.h"
#include "net/http/http_request_info.h"
#include "net/socket/connection_attempts.h"
#include "services/network/throttling/throttling_controller.h"
#include "services/network/throttling/throttling_network_interceptor.h"
#include "services/network/throttling/throttling_upload_data_stream.h"
namespace network {
ThrottlingNetworkTransaction::ThrottlingNetworkTransaction(
std::unique_ptr<net::HttpTransaction> network_transaction)
: … { … }
ThrottlingNetworkTransaction::~ThrottlingNetworkTransaction() { … }
void ThrottlingNetworkTransaction::IOCallback(
bool start,
int result) { … }
int ThrottlingNetworkTransaction::Throttle(
bool start,
int result) { … }
void ThrottlingNetworkTransaction::ThrottleCallback(
int result,
int64_t bytes) { … }
void ThrottlingNetworkTransaction::Fail() { … }
bool ThrottlingNetworkTransaction::CheckFailed() { … }
int ThrottlingNetworkTransaction::Start(const net::HttpRequestInfo* request,
net::CompletionOnceCallback callback,
const net::NetLogWithSource& net_log) { … }
int ThrottlingNetworkTransaction::RestartIgnoringLastError(
net::CompletionOnceCallback callback) { … }
int ThrottlingNetworkTransaction::RestartWithCertificate(
scoped_refptr<net::X509Certificate> client_cert,
scoped_refptr<net::SSLPrivateKey> client_private_key,
net::CompletionOnceCallback callback) { … }
int ThrottlingNetworkTransaction::RestartWithAuth(
const net::AuthCredentials& credentials,
net::CompletionOnceCallback callback) { … }
bool ThrottlingNetworkTransaction::IsReadyToRestartForAuth() { … }
int ThrottlingNetworkTransaction::Read(net::IOBuffer* buf,
int buf_len,
net::CompletionOnceCallback callback) { … }
void ThrottlingNetworkTransaction::StopCaching() { … }
int64_t ThrottlingNetworkTransaction::GetTotalReceivedBytes() const { … }
int64_t ThrottlingNetworkTransaction::GetTotalSentBytes() const { … }
int64_t ThrottlingNetworkTransaction::GetReceivedBodyBytes() const { … }
void ThrottlingNetworkTransaction::DoneReading() { … }
const net::HttpResponseInfo* ThrottlingNetworkTransaction::GetResponseInfo()
const { … }
net::LoadState ThrottlingNetworkTransaction::GetLoadState() const { … }
void ThrottlingNetworkTransaction::SetQuicServerInfo(
net::QuicServerInfo* quic_server_info) { … }
bool ThrottlingNetworkTransaction::GetLoadTimingInfo(
net::LoadTimingInfo* load_timing_info) const { … }
bool ThrottlingNetworkTransaction::GetRemoteEndpoint(
net::IPEndPoint* endpoint) const { … }
void ThrottlingNetworkTransaction::PopulateNetErrorDetails(
net::NetErrorDetails* details) const { … }
void ThrottlingNetworkTransaction::SetPriority(net::RequestPriority priority) { … }
void ThrottlingNetworkTransaction::SetWebSocketHandshakeStreamCreateHelper(
net::WebSocketHandshakeStreamBase::CreateHelper* create_helper) { … }
void ThrottlingNetworkTransaction::SetBeforeNetworkStartCallback(
BeforeNetworkStartCallback callback) { … }
void ThrottlingNetworkTransaction::SetRequestHeadersCallback(
net::RequestHeadersCallback callback) { … }
void ThrottlingNetworkTransaction::SetResponseHeadersCallback(
net::ResponseHeadersCallback callback) { … }
void ThrottlingNetworkTransaction::SetEarlyResponseHeadersCallback(
net::ResponseHeadersCallback callback) { … }
void ThrottlingNetworkTransaction::SetConnectedCallback(
const ConnectedCallback& callback) { … }
void ThrottlingNetworkTransaction::SetModifyRequestHeadersCallback(
base::RepeatingCallback<void(net::HttpRequestHeaders*)> callback) { … }
void ThrottlingNetworkTransaction::SetIsSharedDictionaryReadAllowedCallback(
base::RepeatingCallback<bool()> callback) { … }
int ThrottlingNetworkTransaction::ResumeNetworkStart() { … }
net::ConnectionAttempts ThrottlingNetworkTransaction::GetConnectionAttempts()
const { … }
void ThrottlingNetworkTransaction::CloseConnectionOnDestruction() { … }
bool ThrottlingNetworkTransaction::IsMdlMatchForMetrics() const { … }
}