#include "net/http/http_stream_pool_test_util.h"
#include "net/base/completion_once_callback.h"
#include "net/base/connection_endpoint_metadata.h"
#include "net/base/net_errors.h"
#include "net/log/net_log_with_source.h"
#include "net/socket/socket_test_util.h"
#include "net/socket/stream_socket.h"
#include "net/ssl/ssl_connection_status_flags.h"
#include "net/test/cert_test_util.h"
#include "net/test/test_data_directory.h"
#include "net/traffic_annotation/network_traffic_annotation.h"
namespace net {
namespace {
IPEndPoint MakeIPEndPoint(std::string_view addr, uint16_t port = 80) { … }
}
FakeServiceEndpointRequest::FakeServiceEndpointRequest() = default;
FakeServiceEndpointRequest::~FakeServiceEndpointRequest() = default;
FakeServiceEndpointRequest&
FakeServiceEndpointRequest::CompleteStartSynchronously(int rv) { … }
FakeServiceEndpointRequest&
FakeServiceEndpointRequest::CallOnServiceEndpointsUpdated() { … }
FakeServiceEndpointRequest&
FakeServiceEndpointRequest::CallOnServiceEndpointRequestFinished(int rv) { … }
int FakeServiceEndpointRequest::Start(Delegate* delegate) { … }
const std::vector<ServiceEndpoint>&
FakeServiceEndpointRequest::GetEndpointResults() { … }
const std::set<std::string>& FakeServiceEndpointRequest::GetDnsAliasResults() { … }
bool FakeServiceEndpointRequest::EndpointsCryptoReady() { … }
ResolveErrorInfo FakeServiceEndpointRequest::GetResolveErrorInfo() { … }
void FakeServiceEndpointRequest::ChangeRequestPriority(
RequestPriority priority) { … }
FakeServiceEndpointResolver::FakeServiceEndpointResolver() = default;
FakeServiceEndpointResolver::~FakeServiceEndpointResolver() = default;
FakeServiceEndpointRequest* FakeServiceEndpointResolver::AddFakeRequest() { … }
void FakeServiceEndpointResolver::OnShutdown() { … }
std::unique_ptr<HostResolver::ResolveHostRequest>
FakeServiceEndpointResolver::CreateRequest(
url::SchemeHostPort host,
NetworkAnonymizationKey network_anonymization_key,
NetLogWithSource net_log,
std::optional<ResolveHostParameters> optional_parameters) { … }
std::unique_ptr<HostResolver::ResolveHostRequest>
FakeServiceEndpointResolver::CreateRequest(
const HostPortPair& host,
const NetworkAnonymizationKey& network_anonymization_key,
const NetLogWithSource& net_log,
const std::optional<ResolveHostParameters>& optional_parameters) { … }
std::unique_ptr<HostResolver::ServiceEndpointRequest>
FakeServiceEndpointResolver::CreateServiceEndpointRequest(
Host host,
NetworkAnonymizationKey network_anonymization_key,
NetLogWithSource net_log,
ResolveHostParameters parameters) { … }
ServiceEndpointBuilder::ServiceEndpointBuilder() = default;
ServiceEndpointBuilder::~ServiceEndpointBuilder() = default;
ServiceEndpointBuilder& ServiceEndpointBuilder::add_v4(std::string_view addr,
uint16_t port) { … }
ServiceEndpointBuilder& ServiceEndpointBuilder::add_v6(std::string_view addr,
uint16_t port) { … }
ServiceEndpointBuilder& ServiceEndpointBuilder::add_ip_endpoint(
IPEndPoint ip_endpoint) { … }
ServiceEndpointBuilder& ServiceEndpointBuilder::set_alpns(
std::vector<std::string> alpns) { … }
std::unique_ptr<FakeStreamSocket> FakeStreamSocket::CreateForSpdy() { … }
FakeStreamSocket::FakeStreamSocket() : … { … }
FakeStreamSocket::~FakeStreamSocket() = default;
int FakeStreamSocket::Read(IOBuffer* buf,
int buf_len,
CompletionOnceCallback callback) { … }
int FakeStreamSocket::Write(
IOBuffer* buf,
int buf_len,
CompletionOnceCallback callback,
const NetworkTrafficAnnotationTag& traffic_annotation) { … }
int FakeStreamSocket::Connect(CompletionOnceCallback callback) { … }
bool FakeStreamSocket::IsConnected() const { … }
bool FakeStreamSocket::IsConnectedAndIdle() const { … }
bool FakeStreamSocket::WasEverUsed() const { … }
bool FakeStreamSocket::GetSSLInfo(SSLInfo* ssl_info) { … }
HttpStreamKey GroupIdToHttpStreamKey(
const ClientSocketPool::GroupId& group_id) { … }
}