#include "components/attribution_reporting/source_registration.h"
#include <stdint.h>
#include <optional>
#include <string>
#include <utility>
#include "base/check.h"
#include "base/feature_list.h"
#include "base/json/json_reader.h"
#include "base/metrics/histogram_functions.h"
#include "base/time/time.h"
#include "base/types/expected.h"
#include "base/types/expected_macros.h"
#include "base/values.h"
#include "components/attribution_reporting/aggregatable_debug_reporting_config.h"
#include "components/attribution_reporting/aggregation_keys.h"
#include "components/attribution_reporting/attribution_scopes_data.h"
#include "components/attribution_reporting/constants.h"
#include "components/attribution_reporting/destination_set.h"
#include "components/attribution_reporting/event_level_epsilon.h"
#include "components/attribution_reporting/event_report_windows.h"
#include "components/attribution_reporting/features.h"
#include "components/attribution_reporting/filters.h"
#include "components/attribution_reporting/parsing_utils.h"
#include "components/attribution_reporting/source_registration_error.mojom.h"
#include "components/attribution_reporting/source_type.mojom.h"
#include "components/attribution_reporting/suitable_origin.h"
#include "components/attribution_reporting/trigger_config.h"
#include "mojo/public/cpp/bindings/default_construct_tag.h"
namespace attribution_reporting {
namespace {
SourceRegistrationError;
SourceType;
base::TimeDelta AdjustExpiry(base::TimeDelta expiry, SourceType source_type) { … }
}
void RecordSourceRegistrationError(SourceRegistrationError error) { … }
SourceRegistration::SourceRegistration(mojo::DefaultConstruct::Tag tag)
: … { … }
SourceRegistration::SourceRegistration(DestinationSet destination_set)
: … { … }
SourceRegistration::~SourceRegistration() = default;
SourceRegistration::SourceRegistration(const SourceRegistration&) = default;
SourceRegistration& SourceRegistration::operator=(const SourceRegistration&) =
default;
SourceRegistration::SourceRegistration(SourceRegistration&&) = default;
SourceRegistration& SourceRegistration::operator=(SourceRegistration&&) =
default;
namespace {
base::expected<SourceRegistration, SourceRegistrationError> ParseDict(
base::Value::Dict registration,
SourceType source_type) { … }
}
base::expected<SourceRegistration, SourceRegistrationError>
SourceRegistration::Parse(base::Value value, SourceType source_type) { … }
base::expected<SourceRegistration, SourceRegistrationError>
SourceRegistration::Parse(std::string_view json, SourceType source_type) { … }
base::Value::Dict SourceRegistration::ToJson() const { … }
bool SourceRegistration::IsValid() const { … }
bool SourceRegistration::IsValidForSourceType(SourceType source_type) const { … }
}