#include "net/dns/dns_task_results_manager.h"
#include <algorithm>
#include <map>
#include <memory>
#include <set>
#include <string>
#include <vector>
#include "base/memory/raw_ptr.h"
#include "base/strings/string_number_conversions.h"
#include "base/time/time.h"
#include "base/timer/timer.h"
#include "net/base/connection_endpoint_metadata.h"
#include "net/base/ip_endpoint.h"
#include "net/base/net_errors.h"
#include "net/dns/host_resolver.h"
#include "net/dns/host_resolver_dns_task.h"
#include "net/dns/host_resolver_internal_result.h"
#include "net/dns/https_record_rdata.h"
#include "net/dns/public/dns_query_type.h"
#include "net/dns/public/host_resolver_results.h"
#include "net/log/net_log_event_type.h"
#include "net/log/net_log_with_source.h"
#include "third_party/abseil-cpp/absl/types/variant.h"
#include "url/scheme_host_port.h"
namespace net {
namespace {
bool CompareServiceEndpointAddresses(const ServiceEndpoint& a,
const ServiceEndpoint& b) { … }
bool CompareServiceEndpoint(const ServiceEndpoint& a,
const ServiceEndpoint& b) { … }
}
struct DnsTaskResultsManager::PerDomainResult { … };
DnsTaskResultsManager::DnsTaskResultsManager(Delegate* delegate,
HostResolver::Host host,
DnsQueryTypeSet query_types,
const NetLogWithSource& net_log)
: … { … }
DnsTaskResultsManager::~DnsTaskResultsManager() = default;
void DnsTaskResultsManager::ProcessDnsTransactionResults(
DnsQueryType query_type,
const std::set<std::unique_ptr<HostResolverInternalResult>>& results) { … }
const std::vector<ServiceEndpoint>& DnsTaskResultsManager::GetCurrentEndpoints()
const { … }
const std::set<std::string>& DnsTaskResultsManager::GetAliases() const { … }
bool DnsTaskResultsManager::IsMetadataReady() const { … }
DnsTaskResultsManager::PerDomainResult&
DnsTaskResultsManager::GetOrCreatePerDomainResult(
const std::string& domain_name) { … }
void DnsTaskResultsManager::OnAaaaResolutionTimedout() { … }
void DnsTaskResultsManager::UpdateEndpoints() { … }
bool DnsTaskResultsManager::HasIpv4Addresses() { … }
void DnsTaskResultsManager::RecordResolutionDelayResult(bool timedout) { … }
}