#include "components/ip_protection/common/masked_domain_list_manager.h"
#include <set>
#include <vector>
#include "base/containers/contains.h"
#include "base/metrics/histogram_functions.h"
#include "base/trace_event/memory_usage_estimator.h"
#include "components/ip_protection/common/ip_protection_telemetry.h"
#include "components/ip_protection/common/url_matcher_with_bypass.h"
#include "components/privacy_sandbox/masked_domain_list/masked_domain_list.pb.h"
#include "net/base/features.h"
#include "net/base/schemeful_site.h"
#include "net/base/url_util.h"
#include "services/network/public/cpp/features.h"
#include "url/url_constants.h"
namespace ip_protection {
namespace {
UrlMatcherWithBypassResult;
PublicSuffixListRule;
Resource;
ResourceOwner;
IpProtectionProxyBypassPolicy;
ResourceOwner RemovePslPrivateDomainsFromOwnedResources(
const std::set<std::string>& psl_private_domains,
const ResourceOwner& resource_owner) { … }
}
MaskedDomainListManager::MaskedDomainListManager(
IpProtectionProxyBypassPolicy policy)
: … { … }
MaskedDomainListManager::~MaskedDomainListManager() = default;
MaskedDomainListManager::MaskedDomainListManager(
const MaskedDomainListManager&) { … }
MaskedDomainListManager MaskedDomainListManager::CreateForTesting(
const std::map<std::string, std::set<std::string>>& first_party_map) { … }
bool MaskedDomainListManager::IsEnabled() const { … }
bool MaskedDomainListManager::IsPopulated() const { … }
size_t MaskedDomainListManager::EstimateMemoryUsage() const { … }
bool MaskedDomainListManager::Matches(
const GURL& request_url,
const net::NetworkAnonymizationKey& network_anonymization_key) const { … }
std::set<std::string> MaskedDomainListManager::ExcludeDomainsFromMDL(
const std::set<std::string>& mdl_domains,
const std::set<std::string>& excluded_domains) { … }
void MaskedDomainListManager::UpdateMaskedDomainList(
const masked_domain_list::MaskedDomainList& mdl,
const std::vector<std::string>& exclusion_list) { … }
bool MaskedDomainListManager::MatchesPublicSuffixList(
const GURL& resource_url) const { … }
void MaskedDomainListManager::AddPublicSuffixListRules(
const std::set<std::string>& domains) { … }
}