chromium/net/dns/dns_udp_tracker.cc

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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 {
// Used in UMA (DNS.UdpLowEntropyReason). Do not renumber or remove values.
enum class LowEntropyReason {};

void RecordLowEntropyUma(LowEntropyReason reason) {}

}  // namespace

// static
constexpr base::TimeDelta DnsUdpTracker::kMaxAge;

// static
constexpr size_t DnsUdpTracker::kMaxRecordedQueries;

// static
constexpr base::TimeDelta DnsUdpTracker::kMaxRecognizedIdAge;

// static
constexpr size_t DnsUdpTracker::kUnrecognizedIdMismatchThreshold;

// static
constexpr size_t DnsUdpTracker::kRecognizedIdMismatchThreshold;

// static
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) {}

}  // namespace net