#include "components/attribution_reporting/attribution_scopes_data.h"
#include <stdint.h>
#include <optional>
#include <utility>
#include "base/check.h"
#include "base/types/expected.h"
#include "base/types/expected_macros.h"
#include "base/values.h"
#include "components/attribution_reporting/attribution_scopes_set.h"
#include "components/attribution_reporting/constants.h"
#include "components/attribution_reporting/parsing_utils.h"
#include "components/attribution_reporting/privacy_math.h"
#include "components/attribution_reporting/source_registration_error.mojom.h"
namespace attribution_reporting {
namespace {
SourceRegistrationError;
bool ScopesValid(const AttributionScopesSet& scopes, uint32_t scope_limit) { … }
bool EventStatesValid(uint32_t max_event_states) { … }
bool DataValid(const AttributionScopesSet& scopes_set,
uint32_t scope_limit,
uint32_t max_event_states) { … }
}
std::optional<AttributionScopesData> AttributionScopesData::Create(
AttributionScopesSet attribution_scopes_set,
uint32_t attribution_scope_limit,
uint32_t max_event_states) { … }
base::expected<AttributionScopesData, SourceRegistrationError>
AttributionScopesData::FromJSON(base::Value& v) { … }
AttributionScopesData::AttributionScopesData(AttributionScopesSet scopes,
uint32_t attribution_scope_limit,
uint32_t max_event_states)
: … { … }
AttributionScopesData::AttributionScopesData(mojo::DefaultConstruct::Tag) { … }
AttributionScopesData::~AttributionScopesData() = default;
AttributionScopesData::AttributionScopesData(const AttributionScopesData&) =
default;
AttributionScopesData::AttributionScopesData(AttributionScopesData&&) = default;
AttributionScopesData& AttributionScopesData::operator=(
const AttributionScopesData&) = default;
AttributionScopesData& AttributionScopesData::operator=(
AttributionScopesData&&) = default;
base::Value::Dict AttributionScopesData::ToJson() const { … }
}