#include "services/proxy_resolver/proxy_host_resolver_cache.h"
#include <list>
#include <map>
#include <string>
#include <utility>
#include <vector>
#include "base/check_op.h"
#include "base/not_fatal_until.h"
#include "base/time/time.h"
#include "net/base/ip_address.h"
#include "net/base/net_errors.h"
#include "net/base/network_anonymization_key.h"
namespace proxy_resolver {
constexpr base::TimeDelta ProxyHostResolverCache::kTtl;
ProxyHostResolverCache::ProxyHostResolverCache(size_t max_entries)
: … { … }
ProxyHostResolverCache::~ProxyHostResolverCache() = default;
void ProxyHostResolverCache::StoreEntry(
std::string hostname,
net::NetworkAnonymizationKey network_anonymization_key,
bool is_ex_operation,
std::vector<net::IPAddress> results) { … }
const std::vector<net::IPAddress>* ProxyHostResolverCache::LookupEntry(
std::string hostname,
net::NetworkAnonymizationKey network_anonymization_key,
bool is_ex_operation) { … }
size_t ProxyHostResolverCache::GetSizeForTesting() const { … }
ProxyHostResolverCache::Entry::Entry(
std::vector<net::IPAddress> results,
base::TimeTicks expiration,
ExpirationList::iterator expiration_list_it)
: … { … }
ProxyHostResolverCache::Entry::~Entry() = default;
ProxyHostResolverCache::Entry::Entry(Entry&&) = default;
ProxyHostResolverCache::Entry& ProxyHostResolverCache::Entry::operator=(
Entry&&) = default;
void ProxyHostResolverCache::RemoveOldestEntry() { … }
}