chromium/content/browser/attribution_reporting/attribution_report.cc

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "content/browser/attribution_reporting/attribution_report.h"

#include <algorithm>
#include <cmath>
#include <optional>
#include <string>
#include <utility>

#include "base/check.h"
#include "base/check_op.h"
#include "base/functional/overloaded.h"
#include "base/numerics/checked_math.h"
#include "base/strings/strcat.h"
#include "base/strings/string_number_conversions.h"
#include "base/values.h"
#include "components/attribution_reporting/aggregatable_trigger_config.h"
#include "components/attribution_reporting/destination_set.h"
#include "components/attribution_reporting/source_type.h"
#include "components/attribution_reporting/suitable_origin.h"
#include "content/browser/attribution_reporting/aggregatable_attribution_utils.h"
#include "content/browser/attribution_reporting/common_source_info.h"
#include "content/browser/attribution_reporting/stored_source.h"
#include "third_party/abseil-cpp/absl/types/variant.h"
#include "third_party/blink/public/mojom/aggregation_service/aggregatable_report.mojom.h"
#include "url/gurl.h"
#include "url/origin.h"
#include "url/url_canon.h"

namespace content {

namespace {

SuitableOrigin;

void PopulateReportBody(base::Value::Dict& dict,
                        const AttributionReport::CommonAggregatableData& data) {}

}  // namespace

AttributionReport::EventLevelData::EventLevelData(uint32_t trigger_data,
                                                  int64_t priority,
                                                  const StoredSource& source)
    :{}

AttributionReport::EventLevelData::EventLevelData(const EventLevelData&) =
    default;

AttributionReport::EventLevelData& AttributionReport::EventLevelData::operator=(
    const EventLevelData&) = default;

AttributionReport::EventLevelData::EventLevelData(EventLevelData&&) = default;

AttributionReport::EventLevelData& AttributionReport::EventLevelData::operator=(
    EventLevelData&&) = default;

AttributionReport::EventLevelData::~EventLevelData() = default;

AttributionReport::CommonAggregatableData::CommonAggregatableData(
    std::optional<SuitableOrigin> aggregation_coordinator_origin,
    attribution_reporting::AggregatableTriggerConfig
        aggregatable_trigger_config)
    :{}

AttributionReport::CommonAggregatableData::CommonAggregatableData(
    const CommonAggregatableData&) = default;

AttributionReport::CommonAggregatableData&
AttributionReport::CommonAggregatableData::operator=(
    const CommonAggregatableData&) = default;

AttributionReport::CommonAggregatableData::CommonAggregatableData(
    CommonAggregatableData&&) = default;

AttributionReport::CommonAggregatableData&
AttributionReport::CommonAggregatableData::operator=(CommonAggregatableData&&) =
    default;

AttributionReport::CommonAggregatableData::~CommonAggregatableData() = default;

AttributionReport::AggregatableAttributionData::AggregatableAttributionData(
    CommonAggregatableData common_data,
    std::vector<blink::mojom::AggregatableReportHistogramContribution>
        contributions,
    const StoredSource& source)
    :{}

AttributionReport::AggregatableAttributionData::AggregatableAttributionData(
    const AggregatableAttributionData&) = default;

AttributionReport::AggregatableAttributionData&
AttributionReport::AggregatableAttributionData::operator=(
    const AggregatableAttributionData&) = default;

AttributionReport::AggregatableAttributionData::AggregatableAttributionData(
    AggregatableAttributionData&&) = default;

AttributionReport::AggregatableAttributionData&
AttributionReport::AggregatableAttributionData::operator=(
    AggregatableAttributionData&&) = default;

AttributionReport::AggregatableAttributionData::~AggregatableAttributionData() =
    default;

base::CheckedNumeric<int64_t>
AttributionReport::AggregatableAttributionData::BudgetRequired() const {}

AttributionReport::NullAggregatableData::NullAggregatableData(
    CommonAggregatableData common_data,
    base::Time fake_source_time)
    :{}

AttributionReport::NullAggregatableData::NullAggregatableData(
    const NullAggregatableData&) = default;

AttributionReport::NullAggregatableData::NullAggregatableData(
    NullAggregatableData&&) = default;

AttributionReport::NullAggregatableData&
AttributionReport::NullAggregatableData::operator=(
    const NullAggregatableData&) = default;

AttributionReport::NullAggregatableData&
AttributionReport::NullAggregatableData::operator=(NullAggregatableData&&) =
    default;

AttributionReport::NullAggregatableData::~NullAggregatableData() = default;

AttributionReport::AttributionReport(AttributionInfo attribution_info,
                                     Id id,
                                     base::Time report_time,
                                     base::Time initial_report_time,
                                     base::Uuid external_report_id,
                                     int failed_send_attempts,
                                     Data data,
                                     SuitableOrigin reporting_origin)
    :{}

AttributionReport::AttributionReport(const AttributionReport&) = default;

AttributionReport& AttributionReport::operator=(const AttributionReport&) =
    default;

AttributionReport::AttributionReport(AttributionReport&&) = default;

AttributionReport& AttributionReport::operator=(AttributionReport&&) = default;

AttributionReport::~AttributionReport() = default;

GURL AttributionReport::ReportURL(bool debug) const {}

base::Value::Dict AttributionReport::ReportBody() const {}

void AttributionReport::set_report_time(base::Time report_time) {}

// static
std::optional<base::Time> AttributionReport::MinReportTime(
    std::optional<base::Time> a,
    std::optional<base::Time> b) {}

std::optional<uint64_t> AttributionReport::GetSourceDebugKey() const {}

const SuitableOrigin& AttributionReport::GetSourceOrigin() const {}

bool AttributionReport::CanDebuggingBeEnabled() const {}

}  // namespace content