#include "content/browser/attribution_reporting/attribution_resolver_delegate_impl.h"
#include <stddef.h>
#include <stdint.h>
#include <cstdlib>
#include <iterator>
#include <optional>
#include <utility>
#include <vector>
#include "base/feature_list.h"
#include "base/memory/ptr_util.h"
#include "base/rand_util.h"
#include "base/time/time.h"
#include "base/types/expected_macros.h"
#include "base/uuid.h"
#include "components/attribution_reporting/aggregatable_trigger_config.h"
#include "components/attribution_reporting/attribution_scopes_data.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/privacy_math.h"
#include "components/attribution_reporting/source_registration_time_config.mojom.h"
#include "components/attribution_reporting/source_type.mojom.h"
#include "components/attribution_reporting/trigger_config.h"
#include "content/browser/attribution_reporting/attribution_config.h"
#include "content/browser/attribution_reporting/attribution_report.h"
#include "content/browser/attribution_reporting/stored_source.h"
namespace content {
namespace {
SourceType;
}
std::unique_ptr<AttributionResolverDelegate>
AttributionResolverDelegateImpl::CreateForTesting(
AttributionNoiseMode noise_mode,
AttributionDelayMode delay_mode,
const AttributionConfig& config) { … }
AttributionResolverDelegateImpl::AttributionResolverDelegateImpl(
AttributionNoiseMode noise_mode,
AttributionDelayMode delay_mode)
: … { … }
AttributionResolverDelegateImpl::AttributionResolverDelegateImpl(
AttributionNoiseMode noise_mode,
AttributionDelayMode delay_mode,
const AttributionConfig& config)
: … { … }
AttributionResolverDelegateImpl::~AttributionResolverDelegateImpl() = default;
base::TimeDelta
AttributionResolverDelegateImpl::GetDeleteExpiredSourcesFrequency() const { … }
base::TimeDelta
AttributionResolverDelegateImpl::GetDeleteExpiredRateLimitsFrequency() const { … }
base::Time AttributionResolverDelegateImpl::GetEventLevelReportTime(
const attribution_reporting::EventReportWindows& event_report_windows,
base::Time source_time,
base::Time trigger_time) const { … }
base::Time AttributionResolverDelegateImpl::GetAggregatableReportTime(
base::Time trigger_time) const { … }
base::Uuid AttributionResolverDelegateImpl::NewReportID() const { … }
std::optional<AttributionResolverDelegate::OfflineReportDelayConfig>
AttributionResolverDelegateImpl::GetOfflineReportDelayConfig() const { … }
void AttributionResolverDelegateImpl::ShuffleReports(
std::vector<AttributionReport>& reports) { … }
std::optional<double>
AttributionResolverDelegateImpl::GetRandomizedResponseRate(
const attribution_reporting::TriggerSpecs& trigger_specs,
attribution_reporting::EventLevelEpsilon epsilon) const { … }
AttributionResolverDelegate::GetRandomizedResponseResult
AttributionResolverDelegateImpl::GetRandomizedResponse(
SourceType source_type,
const attribution_reporting::TriggerSpecs& trigger_specs,
attribution_reporting::EventLevelEpsilon epsilon,
const std::optional<attribution_reporting::AttributionScopesData>&
scopes_data) { … }
bool AttributionResolverDelegateImpl::
GenerateNullAggregatableReportForLookbackDay(
int lookback_day,
attribution_reporting::mojom::SourceRegistrationTimeConfig
source_registration_time_config) const { … }
}