#include "net/dns/dns_udp_tracker.h"
#include <utility>
#include "base/metrics/histogram_macros.h"
#include "base/numerics/safe_conversions.h"
#include "base/ranges/algorithm.h"
#include "base/time/tick_clock.h"
#include "net/base/net_errors.h"
namespace net {
namespace {
enum class LowEntropyReason { … };
void RecordLowEntropyUma(LowEntropyReason reason) { … }
}
constexpr base::TimeDelta DnsUdpTracker::kMaxAge;
constexpr size_t DnsUdpTracker::kMaxRecordedQueries;
constexpr base::TimeDelta DnsUdpTracker::kMaxRecognizedIdAge;
constexpr size_t DnsUdpTracker::kUnrecognizedIdMismatchThreshold;
constexpr size_t DnsUdpTracker::kRecognizedIdMismatchThreshold;
constexpr int DnsUdpTracker::kPortReuseThreshold;
struct DnsUdpTracker::QueryData { … };
DnsUdpTracker::DnsUdpTracker() = default;
DnsUdpTracker::~DnsUdpTracker() = default;
DnsUdpTracker::DnsUdpTracker(DnsUdpTracker&&) = default;
DnsUdpTracker& DnsUdpTracker::operator=(DnsUdpTracker&&) = default;
void DnsUdpTracker::RecordQuery(uint16_t port, uint16_t query_id) { … }
void DnsUdpTracker::RecordResponseId(uint16_t query_id, uint16_t response_id) { … }
void DnsUdpTracker::RecordConnectionError(int connection_error) { … }
void DnsUdpTracker::PurgeOldRecords() { … }
void DnsUdpTracker::SaveQuery(QueryData query) { … }
void DnsUdpTracker::SaveIdMismatch(uint16_t id) { … }
}