#include "services/network/public/cpp/cors/origin_access_list.h"
#include "services/network/public/cpp/resource_request.h"
#include "services/network/public/mojom/cors_origin_pattern.mojom.h"
namespace network::cors {
OriginAccessList::OriginAccessList() = default;
OriginAccessList::~OriginAccessList() = default;
void OriginAccessList::SetAllowListForOrigin(
const url::Origin& source_origin,
const std::vector<CorsOriginPatternPtr>& patterns) { … }
void OriginAccessList::AddAllowListEntryForOrigin(
const url::Origin& source_origin,
const std::string& protocol,
const std::string& domain,
const uint16_t port,
const mojom::CorsDomainMatchMode domain_match_mode,
const mojom::CorsPortMatchMode port_match_mode,
const mojom::CorsOriginAccessMatchPriority priority) { … }
void OriginAccessList::SetBlockListForOrigin(
const url::Origin& source_origin,
const std::vector<CorsOriginPatternPtr>& patterns) { … }
void OriginAccessList::AddBlockListEntryForOrigin(
const url::Origin& source_origin,
const std::string& protocol,
const std::string& domain,
const uint16_t port,
const mojom::CorsDomainMatchMode domain_match_mode,
const mojom::CorsPortMatchMode port_match_mode,
const mojom::CorsOriginAccessMatchPriority priority) { … }
void OriginAccessList::ClearForOrigin(const url::Origin& source_origin) { … }
void OriginAccessList::Clear() { … }
OriginAccessList::AccessState OriginAccessList::CheckAccessState(
const url::Origin& source_origin,
const GURL& destination) const { … }
OriginAccessList::AccessState OriginAccessList::CheckAccessState(
const ResourceRequest& request) const { … }
std::vector<mojo::StructPtr<mojom::CorsOriginAccessPatterns>>
OriginAccessList::CreateCorsOriginAccessPatternsList() const { … }
void OriginAccessList::SetForOrigin(
const url::Origin& source_origin,
const std::vector<CorsOriginPatternPtr>& patterns,
OriginPatternsMap* map,
MapType type) { … }
void OriginAccessList::AddForOrigin(const url::Origin& source_origin,
const CorsOriginPatternPtr& pattern,
OriginPatternsMap* map,
MapType type) { … }
network::mojom::CorsOriginAccessMatchPriority
OriginAccessList::GetHighestPriorityOfRuleForOrigin(
const url::Origin& destination_origin,
const PatternsMap& patterns_map,
MapType type) { … }
}