chromium/third_party/blink/renderer/modules/shared_storage/private_aggregation.cc

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

#include "third_party/blink/renderer/modules/shared_storage/private_aggregation.h"

#include <stdint.h>

#include <bit>
#include <iterator>
#include <memory>
#include <optional>
#include <utility>

#include "base/check.h"
#include "base/feature_list.h"
#include "base/ranges/algorithm.h"
#include "third_party/abseil-cpp/absl/numeric/int128.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/mojom/shared_storage/shared_storage_worklet_service.mojom-blink.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-blink.h"
#include "third_party/blink/public/platform/cross_variant_mojo_util.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_throw_dom_exception.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_binding_for_modules.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_private_aggregation_debug_mode_options.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_private_aggregation_histogram_contribution.h"
#include "third_party/blink/renderer/core/dom/dom_exception.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/modules/shared_storage/shared_storage_worklet_global_scope.h"
#include "third_party/blink/renderer/modules/shared_storage/util.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/context_lifecycle_notifier.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/heap/persistent.h"
#include "third_party/blink/renderer/platform/heap/visitor.h"
#include "third_party/blink/renderer/platform/instrumentation/use_counter.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
#include "third_party/blink/renderer/platform/wtf/vector.h"

namespace blink {

namespace {

constexpr char kPermissionsPolicyErrorMessage[] =;

constexpr size_t kBitsPerByte =;

}  // namespace

PrivateAggregation::PrivateAggregation(
    SharedStorageWorkletGlobalScope* global_scope)
    :{}

PrivateAggregation::~PrivateAggregation() = default;

void PrivateAggregation::Trace(Visitor* visitor) const {}

// TODO(alexmt): Consider merging parsing logic with FLEDGE worklet.
void PrivateAggregation::contributeToHistogram(
    ScriptState* script_state,
    const PrivateAggregationHistogramContribution* contribution,
    ExceptionState& exception_state) {}

void PrivateAggregation::enableDebugMode(ScriptState* script_state,
                                         ExceptionState& exception_state) {}

void PrivateAggregation::enableDebugMode(
    ScriptState* script_state,
    const PrivateAggregationDebugModeOptions* options,
    ExceptionState& exception_state) {}

void PrivateAggregation::OnOperationStarted(
    int64_t operation_id,
    mojom::blink::PrivateAggregationOperationDetailsPtr pa_operation_details) {}

void PrivateAggregation::OnOperationFinished(int64_t operation_id) {}

void PrivateAggregation::OnWorkletDestroyed() {}

void PrivateAggregation::EnsureGeneralUseCountersAreRecorded() {}

void PrivateAggregation::EnsureEnableDebugModeUseCounterIsRecorded() {}

void PrivateAggregation::EnsureFilteringIdUseCounterIsRecorded() {}

}  // namespace blink