#include "net/dns/host_resolver_manager_request_impl.h"
#include <deque>
#include <optional>
#include <set>
#include <string>
#include <vector>
#include "base/containers/linked_list.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/safe_ref.h"
#include "base/memory/weak_ptr.h"
#include "base/metrics/histogram_macros.h"
#include "base/sequence_checker.h"
#include "base/time/tick_clock.h"
#include "net/base/address_list.h"
#include "net/base/completion_once_callback.h"
#include "net/base/network_anonymization_key.h"
#include "net/base/request_priority.h"
#include "net/dns/dns_alias_utility.h"
#include "net/dns/host_cache.h"
#include "net/dns/host_resolver.h"
#include "net/dns/host_resolver_manager.h"
#include "net/dns/host_resolver_manager_job.h"
#include "net/dns/public/host_resolver_results.h"
#include "net/dns/public/resolve_error_info.h"
#include "net/http/http_network_session.h"
#include "net/log/net_log_with_source.h"
#include "net/socket/client_socket_factory.h"
#include "net/url_request/url_request_context.h"
namespace net {
HostResolverManager::RequestImpl::RequestImpl(
NetLogWithSource source_net_log,
HostResolver::Host request_host,
NetworkAnonymizationKey network_anonymization_key,
std::optional<ResolveHostParameters> optional_parameters,
base::WeakPtr<ResolveContext> resolve_context,
base::WeakPtr<HostResolverManager> resolver,
const base::TickClock* tick_clock)
: … { … }
HostResolverManager::RequestImpl::~RequestImpl() { … }
int HostResolverManager::RequestImpl::Start(CompletionOnceCallback callback) { … }
const AddressList* HostResolverManager::RequestImpl::GetAddressResults() const { … }
const std::vector<HostResolverEndpointResult>*
HostResolverManager::RequestImpl::GetEndpointResults() const { … }
const std::vector<std::string>*
HostResolverManager::RequestImpl::GetTextResults() const { … }
const std::vector<HostPortPair>*
HostResolverManager::RequestImpl::GetHostnameResults() const { … }
const std::set<std::string>*
HostResolverManager::RequestImpl::GetDnsAliasResults() const { … }
const std::vector<bool>*
HostResolverManager::RequestImpl::GetExperimentalResultsForTesting() const { … }
net::ResolveErrorInfo HostResolverManager::RequestImpl::GetResolveErrorInfo()
const { … }
const std::optional<HostCache::EntryStaleness>&
HostResolverManager::RequestImpl::GetStaleInfo() const { … }
void HostResolverManager::RequestImpl::ChangeRequestPriority(
RequestPriority priority) { … }
void HostResolverManager::RequestImpl::set_results(HostCache::Entry results) { … }
void HostResolverManager::RequestImpl::set_error_info(
int error,
bool is_secure_network_error) { … }
void HostResolverManager::RequestImpl::set_stale_info(
HostCache::EntryStaleness stale_info) { … }
void HostResolverManager::RequestImpl::AssignJob(base::SafeRef<Job> job) { … }
const HostResolverManager::JobKey& HostResolverManager::RequestImpl::GetJobKey()
const { … }
void HostResolverManager::RequestImpl::OnJobCancelled(const JobKey& job_key) { … }
void HostResolverManager::RequestImpl::OnJobCompleted(
const JobKey& job_key,
int error,
bool is_secure_network_error) { … }
int HostResolverManager::RequestImpl::DoLoop(int rv) { … }
void HostResolverManager::RequestImpl::OnIOComplete(int rv) { … }
int HostResolverManager::RequestImpl::DoIPv6Reachability() { … }
int HostResolverManager::RequestImpl::DoGetParameters() { … }
int HostResolverManager::RequestImpl::DoGetParametersComplete(int rv) { … }
int HostResolverManager::RequestImpl::DoResolveLocally() { … }
int HostResolverManager::RequestImpl::DoStartJob() { … }
int HostResolverManager::RequestImpl::DoFinishRequest(int rv) { … }
void HostResolverManager::RequestImpl::FixUpEndpointAndAliasResults() { … }
void HostResolverManager::RequestImpl::LogStartRequest() { … }
void HostResolverManager::RequestImpl::LogFinishRequest(int net_error,
bool async_completion) { … }
void HostResolverManager::RequestImpl::LogCancelRequest() { … }
ClientSocketFactory*
HostResolverManager::RequestImpl::GetClientSocketFactory() { … }
}