#include "components/attribution_reporting/registration_info.h"
#include <optional>
#include <string>
#include <string_view>
#include "base/metrics/histogram_functions.h"
#include "base/types/expected.h"
#include "base/types/expected_macros.h"
#include "components/attribution_reporting/parsing_utils.h"
#include "components/attribution_reporting/registrar.h"
#include "net/http/structured_headers.h"
namespace attribution_reporting {
namespace {
base::expected<std::optional<Registrar>, ParseError> ParsePreferredPlatform(
const net::structured_headers::Dictionary& dict,
bool cross_app_web_enabled) { … }
base::expected<bool, ParseError> ParseReportHeaderErrors(
const net::structured_headers::Dictionary& dict) { … }
}
base::expected<RegistrationInfo, RegistrationInfoError>
RegistrationInfo::ParseInfo(std::string_view header,
bool cross_app_web_enabled) { … }
base::expected<RegistrationInfo, RegistrationInfoError>
RegistrationInfo::ParseInfo(const net::structured_headers::Dictionary& dict,
bool cross_app_web_enabled) { … }
void RecordRegistrationInfoError(RegistrationInfoError error) { … }
}