#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
#include "third_party/blink/public/mojom/shared_storage/shared_storage_worklet_service.mojom-blink.h"
#include <math.h>
#include <stdint.h>
#include <utility>
#include "base/debug/alias.h"
#include "base/hash/md5_constexpr.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/task/thread_pool/thread_pool_instance.h"
#include "base/trace_event/trace_event.h"
#include "base/trace_event/typed_macros.h"
#include "mojo/public/cpp/bindings/features.h"
#include "mojo/public/cpp/bindings/lib/default_construct_tag_internal.h"
#include "mojo/public/cpp/bindings/lib/generated_code_util.h"
#include "mojo/public/cpp/bindings/lib/message_internal.h"
#include "mojo/public/cpp/bindings/lib/proxy_to_responder.h"
#include "mojo/public/cpp/bindings/lib/send_message_helper.h"
#include "mojo/public/cpp/bindings/lib/serialization_util.h"
#include "mojo/public/cpp/bindings/lib/unserialized_message_context.h"
#include "mojo/public/cpp/bindings/lib/validate_params.h"
#include "mojo/public/cpp/bindings/lib/validation_errors.h"
#include "mojo/public/cpp/bindings/mojo_buildflags.h"
#include "mojo/public/cpp/bindings/urgent_message_scope.h"
#include "mojo/public/interfaces/bindings/interface_control_messages.mojom.h"
#include "third_party/perfetto/include/perfetto/tracing/traced_value.h"
#include "third_party/blink/public/mojom/shared_storage/shared_storage_worklet_service.mojom-params-data.h"
#include "third_party/blink/public/mojom/shared_storage/shared_storage_worklet_service.mojom-shared-message-ids.h"
#include "third_party/blink/public/mojom/shared_storage/shared_storage_worklet_service.mojom-blink-import-headers.h"
#include "third_party/blink/public/mojom/shared_storage/shared_storage_worklet_service.mojom-blink-test-utils.h"
#include "mojo/public/cpp/bindings/lib/wtf_serialization.h"
namespace blink::mojom::blink {
SharedStorageKeyAndOrValue::SharedStorageKeyAndOrValue()
: … { … }
SharedStorageKeyAndOrValue::SharedStorageKeyAndOrValue(
const ::WTF::String& key_in,
const ::WTF::String& value_in)
: … { … }
SharedStorageKeyAndOrValue::~SharedStorageKeyAndOrValue() = default;
void SharedStorageKeyAndOrValue::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool SharedStorageKeyAndOrValue::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
PrivateAggregationOperationDetails::PrivateAggregationOperationDetails()
: … { … }
PrivateAggregationOperationDetails::PrivateAggregationOperationDetails(
::mojo::PendingRemote<::blink::mojom::blink::PrivateAggregationHost> pa_host_in,
uint32_t filtering_id_max_bytes_in)
: … { … }
PrivateAggregationOperationDetails::~PrivateAggregationOperationDetails() = default;
void PrivateAggregationOperationDetails::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool PrivateAggregationOperationDetails::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
const char SharedStorageEntriesListener::Name_[] = …;
SharedStorageEntriesListener::IPCStableHashFunction SharedStorageEntriesListener::MessageToMethodInfo_(mojo::Message& message) { … }
const char* SharedStorageEntriesListener::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t SharedStorageEntriesListener::DidReadEntries_Sym::IPCStableHash() { … }
# endif
SharedStorageEntriesListenerProxy::SharedStorageEntriesListenerProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void SharedStorageEntriesListenerProxy::DidReadEntries(
bool in_success, const WTF::String& in_error_message, WTF::Vector<SharedStorageKeyAndOrValuePtr> in_entries, bool in_has_more_entries, int32_t in_total_queued_to_send) { … }
bool SharedStorageEntriesListenerStubDispatch::Accept(
SharedStorageEntriesListener* impl,
mojo::Message* message) { … }
bool SharedStorageEntriesListenerStubDispatch::AcceptWithResponder(
SharedStorageEntriesListener* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kSharedStorageEntriesListenerValidationInfo[] = …;
bool SharedStorageEntriesListenerRequestValidator::Accept(mojo::Message* message) { … }
const char SharedStorageWorkletServiceClient::Name_[] = …;
SharedStorageWorkletServiceClient::IPCStableHashFunction SharedStorageWorkletServiceClient::MessageToMethodInfo_(mojo::Message& message) { … }
const char* SharedStorageWorkletServiceClient::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t SharedStorageWorkletServiceClient::SharedStorageSet_Sym::IPCStableHash() { … }
uint32_t SharedStorageWorkletServiceClient::SharedStorageAppend_Sym::IPCStableHash() { … }
uint32_t SharedStorageWorkletServiceClient::SharedStorageDelete_Sym::IPCStableHash() { … }
uint32_t SharedStorageWorkletServiceClient::SharedStorageClear_Sym::IPCStableHash() { … }
uint32_t SharedStorageWorkletServiceClient::SharedStorageGet_Sym::IPCStableHash() { … }
uint32_t SharedStorageWorkletServiceClient::SharedStorageKeys_Sym::IPCStableHash() { … }
uint32_t SharedStorageWorkletServiceClient::SharedStorageEntries_Sym::IPCStableHash() { … }
uint32_t SharedStorageWorkletServiceClient::SharedStorageLength_Sym::IPCStableHash() { … }
uint32_t SharedStorageWorkletServiceClient::SharedStorageRemainingBudget_Sym::IPCStableHash() { … }
uint32_t SharedStorageWorkletServiceClient::DidAddMessageToConsole_Sym::IPCStableHash() { … }
uint32_t SharedStorageWorkletServiceClient::RecordUseCounters_Sym::IPCStableHash() { … }
# endif
class SharedStorageWorkletServiceClient_SharedStorageSet_ForwardToCallback
: public mojo::MessageReceiver { … };
class SharedStorageWorkletServiceClient_SharedStorageAppend_ForwardToCallback
: public mojo::MessageReceiver { … };
class SharedStorageWorkletServiceClient_SharedStorageDelete_ForwardToCallback
: public mojo::MessageReceiver { … };
class SharedStorageWorkletServiceClient_SharedStorageClear_ForwardToCallback
: public mojo::MessageReceiver { … };
class SharedStorageWorkletServiceClient_SharedStorageGet_ForwardToCallback
: public mojo::MessageReceiver { … };
class SharedStorageWorkletServiceClient_SharedStorageLength_ForwardToCallback
: public mojo::MessageReceiver { … };
class SharedStorageWorkletServiceClient_SharedStorageRemainingBudget_ForwardToCallback
: public mojo::MessageReceiver { … };
SharedStorageWorkletServiceClientProxy::SharedStorageWorkletServiceClientProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void SharedStorageWorkletServiceClientProxy::SharedStorageSet(
const ::WTF::String& in_key, const ::WTF::String& in_value, bool in_ignore_if_present, SharedStorageSetCallback callback) { … }
void SharedStorageWorkletServiceClientProxy::SharedStorageAppend(
const ::WTF::String& in_key, const ::WTF::String& in_value, SharedStorageAppendCallback callback) { … }
void SharedStorageWorkletServiceClientProxy::SharedStorageDelete(
const ::WTF::String& in_key, SharedStorageDeleteCallback callback) { … }
void SharedStorageWorkletServiceClientProxy::SharedStorageClear(
SharedStorageClearCallback callback) { … }
void SharedStorageWorkletServiceClientProxy::SharedStorageGet(
const ::WTF::String& in_key, SharedStorageGetCallback callback) { … }
void SharedStorageWorkletServiceClientProxy::SharedStorageKeys(
::mojo::PendingRemote<SharedStorageEntriesListener> in_listener) { … }
void SharedStorageWorkletServiceClientProxy::SharedStorageEntries(
::mojo::PendingRemote<SharedStorageEntriesListener> in_listener) { … }
void SharedStorageWorkletServiceClientProxy::SharedStorageLength(
SharedStorageLengthCallback callback) { … }
void SharedStorageWorkletServiceClientProxy::SharedStorageRemainingBudget(
SharedStorageRemainingBudgetCallback callback) { … }
void SharedStorageWorkletServiceClientProxy::DidAddMessageToConsole(
::blink::mojom::blink::ConsoleMessageLevel in_log_level, const WTF::String& in_message) { … }
void SharedStorageWorkletServiceClientProxy::RecordUseCounters(
const WTF::Vector<::blink::mojom::blink::WebFeature>& in_features) { … }
class SharedStorageWorkletServiceClient_SharedStorageSet_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool SharedStorageWorkletServiceClient_SharedStorageSet_ForwardToCallback::Accept(
mojo::Message* message) { … }
void SharedStorageWorkletServiceClient_SharedStorageSet_ProxyToResponder::Run(
bool in_success, const WTF::String& in_error_message) { … }
class SharedStorageWorkletServiceClient_SharedStorageAppend_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool SharedStorageWorkletServiceClient_SharedStorageAppend_ForwardToCallback::Accept(
mojo::Message* message) { … }
void SharedStorageWorkletServiceClient_SharedStorageAppend_ProxyToResponder::Run(
bool in_success, const WTF::String& in_error_message) { … }
class SharedStorageWorkletServiceClient_SharedStorageDelete_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool SharedStorageWorkletServiceClient_SharedStorageDelete_ForwardToCallback::Accept(
mojo::Message* message) { … }
void SharedStorageWorkletServiceClient_SharedStorageDelete_ProxyToResponder::Run(
bool in_success, const WTF::String& in_error_message) { … }
class SharedStorageWorkletServiceClient_SharedStorageClear_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool SharedStorageWorkletServiceClient_SharedStorageClear_ForwardToCallback::Accept(
mojo::Message* message) { … }
void SharedStorageWorkletServiceClient_SharedStorageClear_ProxyToResponder::Run(
bool in_success, const WTF::String& in_error_message) { … }
class SharedStorageWorkletServiceClient_SharedStorageGet_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool SharedStorageWorkletServiceClient_SharedStorageGet_ForwardToCallback::Accept(
mojo::Message* message) { … }
void SharedStorageWorkletServiceClient_SharedStorageGet_ProxyToResponder::Run(
::blink::mojom::blink::SharedStorageGetStatus in_status, const WTF::String& in_error_message, const ::WTF::String& in_value) { … }
class SharedStorageWorkletServiceClient_SharedStorageLength_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool SharedStorageWorkletServiceClient_SharedStorageLength_ForwardToCallback::Accept(
mojo::Message* message) { … }
void SharedStorageWorkletServiceClient_SharedStorageLength_ProxyToResponder::Run(
bool in_success, const WTF::String& in_error_message, uint32_t in_length) { … }
class SharedStorageWorkletServiceClient_SharedStorageRemainingBudget_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool SharedStorageWorkletServiceClient_SharedStorageRemainingBudget_ForwardToCallback::Accept(
mojo::Message* message) { … }
void SharedStorageWorkletServiceClient_SharedStorageRemainingBudget_ProxyToResponder::Run(
bool in_success, const WTF::String& in_error_message, double in_bits) { … }
bool SharedStorageWorkletServiceClientStubDispatch::Accept(
SharedStorageWorkletServiceClient* impl,
mojo::Message* message) { … }
bool SharedStorageWorkletServiceClientStubDispatch::AcceptWithResponder(
SharedStorageWorkletServiceClient* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kSharedStorageWorkletServiceClientValidationInfo[] = …;
bool SharedStorageWorkletServiceClientRequestValidator::Accept(mojo::Message* message) { … }
bool SharedStorageWorkletServiceClientResponseValidator::Accept(mojo::Message* message) { … }
const char SharedStorageWorkletService::Name_[] = …;
SharedStorageWorkletService::IPCStableHashFunction SharedStorageWorkletService::MessageToMethodInfo_(mojo::Message& message) { … }
const char* SharedStorageWorkletService::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t SharedStorageWorkletService::Initialize_Sym::IPCStableHash() { … }
uint32_t SharedStorageWorkletService::AddModule_Sym::IPCStableHash() { … }
uint32_t SharedStorageWorkletService::RunURLSelectionOperation_Sym::IPCStableHash() { … }
uint32_t SharedStorageWorkletService::RunOperation_Sym::IPCStableHash() { … }
# endif
class SharedStorageWorkletService_AddModule_ForwardToCallback
: public mojo::MessageReceiver { … };
class SharedStorageWorkletService_RunURLSelectionOperation_ForwardToCallback
: public mojo::MessageReceiver { … };
class SharedStorageWorkletService_RunOperation_ForwardToCallback
: public mojo::MessageReceiver { … };
SharedStorageWorkletServiceProxy::SharedStorageWorkletServiceProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void SharedStorageWorkletServiceProxy::Initialize(
::mojo::PendingAssociatedRemote<SharedStorageWorkletServiceClient> in_client, bool in_private_aggregation_permissions_policy_allowed, const ::WTF::String& in_embedder_context) { … }
void SharedStorageWorkletServiceProxy::AddModule(
::mojo::PendingRemote<::network::mojom::blink::URLLoaderFactory> in_url_loader_factory, const ::blink::KURL& in_script_source_url, AddModuleCallback callback) { … }
void SharedStorageWorkletServiceProxy::RunURLSelectionOperation(
const WTF::String& in_name, const WTF::Vector<::blink::KURL>& in_urls, ::blink::BlinkCloneableMessage in_serialized_data, PrivateAggregationOperationDetailsPtr in_pa_operation_details, RunURLSelectionOperationCallback callback) { … }
void SharedStorageWorkletServiceProxy::RunOperation(
const WTF::String& in_name, ::blink::BlinkCloneableMessage in_serialized_data, PrivateAggregationOperationDetailsPtr in_pa_operation_details, RunOperationCallback callback) { … }
class SharedStorageWorkletService_AddModule_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool SharedStorageWorkletService_AddModule_ForwardToCallback::Accept(
mojo::Message* message) { … }
void SharedStorageWorkletService_AddModule_ProxyToResponder::Run(
bool in_success, const WTF::String& in_error_message) { … }
class SharedStorageWorkletService_RunURLSelectionOperation_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool SharedStorageWorkletService_RunURLSelectionOperation_ForwardToCallback::Accept(
mojo::Message* message) { … }
void SharedStorageWorkletService_RunURLSelectionOperation_ProxyToResponder::Run(
bool in_success, const WTF::String& in_error_message, uint32_t in_index) { … }
class SharedStorageWorkletService_RunOperation_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool SharedStorageWorkletService_RunOperation_ForwardToCallback::Accept(
mojo::Message* message) { … }
void SharedStorageWorkletService_RunOperation_ProxyToResponder::Run(
bool in_success, const WTF::String& in_error_message) { … }
bool SharedStorageWorkletServiceStubDispatch::Accept(
SharedStorageWorkletService* impl,
mojo::Message* message) { … }
bool SharedStorageWorkletServiceStubDispatch::AcceptWithResponder(
SharedStorageWorkletService* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kSharedStorageWorkletServiceValidationInfo[] = …;
bool SharedStorageWorkletServiceRequestValidator::Accept(mojo::Message* message) { … }
bool SharedStorageWorkletServiceResponseValidator::Accept(mojo::Message* message) { … }
}
namespace mojo {
bool StructTraits<::blink::mojom::blink::SharedStorageKeyAndOrValue::DataView, ::blink::mojom::blink::SharedStorageKeyAndOrValuePtr>::Read(
::blink::mojom::blink::SharedStorageKeyAndOrValue::DataView input,
::blink::mojom::blink::SharedStorageKeyAndOrValuePtr* output) { … }
bool StructTraits<::blink::mojom::blink::PrivateAggregationOperationDetails::DataView, ::blink::mojom::blink::PrivateAggregationOperationDetailsPtr>::Read(
::blink::mojom::blink::PrivateAggregationOperationDetails::DataView input,
::blink::mojom::blink::PrivateAggregationOperationDetailsPtr* output) { … }
}
namespace blink::mojom::blink {
void SharedStorageEntriesListenerInterceptorForTesting::DidReadEntries(bool success, const WTF::String& error_message, WTF::Vector<SharedStorageKeyAndOrValuePtr> entries, bool has_more_entries, int32_t total_queued_to_send) { … }
SharedStorageEntriesListenerAsyncWaiter::SharedStorageEntriesListenerAsyncWaiter(
SharedStorageEntriesListener* proxy) : … { … }
SharedStorageEntriesListenerAsyncWaiter::~SharedStorageEntriesListenerAsyncWaiter() = default;
void SharedStorageWorkletServiceClientInterceptorForTesting::SharedStorageSet(const ::WTF::String& key, const ::WTF::String& value, bool ignore_if_present, SharedStorageSetCallback callback) { … }
void SharedStorageWorkletServiceClientInterceptorForTesting::SharedStorageAppend(const ::WTF::String& key, const ::WTF::String& value, SharedStorageAppendCallback callback) { … }
void SharedStorageWorkletServiceClientInterceptorForTesting::SharedStorageDelete(const ::WTF::String& key, SharedStorageDeleteCallback callback) { … }
void SharedStorageWorkletServiceClientInterceptorForTesting::SharedStorageClear(SharedStorageClearCallback callback) { … }
void SharedStorageWorkletServiceClientInterceptorForTesting::SharedStorageGet(const ::WTF::String& key, SharedStorageGetCallback callback) { … }
void SharedStorageWorkletServiceClientInterceptorForTesting::SharedStorageKeys(::mojo::PendingRemote<SharedStorageEntriesListener> listener) { … }
void SharedStorageWorkletServiceClientInterceptorForTesting::SharedStorageEntries(::mojo::PendingRemote<SharedStorageEntriesListener> listener) { … }
void SharedStorageWorkletServiceClientInterceptorForTesting::SharedStorageLength(SharedStorageLengthCallback callback) { … }
void SharedStorageWorkletServiceClientInterceptorForTesting::SharedStorageRemainingBudget(SharedStorageRemainingBudgetCallback callback) { … }
void SharedStorageWorkletServiceClientInterceptorForTesting::DidAddMessageToConsole(::blink::mojom::blink::ConsoleMessageLevel log_level, const WTF::String& message) { … }
void SharedStorageWorkletServiceClientInterceptorForTesting::RecordUseCounters(const WTF::Vector<::blink::mojom::blink::WebFeature>& features) { … }
SharedStorageWorkletServiceClientAsyncWaiter::SharedStorageWorkletServiceClientAsyncWaiter(
SharedStorageWorkletServiceClient* proxy) : … { … }
SharedStorageWorkletServiceClientAsyncWaiter::~SharedStorageWorkletServiceClientAsyncWaiter() = default;
void SharedStorageWorkletServiceClientAsyncWaiter::SharedStorageSet(
const ::WTF::String& key, const ::WTF::String& value, bool ignore_if_present, bool* out_success, WTF::String* out_error_message) { … }
void SharedStorageWorkletServiceClientAsyncWaiter::SharedStorageAppend(
const ::WTF::String& key, const ::WTF::String& value, bool* out_success, WTF::String* out_error_message) { … }
void SharedStorageWorkletServiceClientAsyncWaiter::SharedStorageDelete(
const ::WTF::String& key, bool* out_success, WTF::String* out_error_message) { … }
void SharedStorageWorkletServiceClientAsyncWaiter::SharedStorageClear(
bool* out_success, WTF::String* out_error_message) { … }
void SharedStorageWorkletServiceClientAsyncWaiter::SharedStorageGet(
const ::WTF::String& key, ::blink::mojom::blink::SharedStorageGetStatus* out_status, WTF::String* out_error_message, ::WTF::String* out_value) { … }
void SharedStorageWorkletServiceClientAsyncWaiter::SharedStorageLength(
bool* out_success, WTF::String* out_error_message, uint32_t* out_length) { … }
void SharedStorageWorkletServiceClientAsyncWaiter::SharedStorageRemainingBudget(
bool* out_success, WTF::String* out_error_message, double* out_bits) { … }
void SharedStorageWorkletServiceInterceptorForTesting::Initialize(::mojo::PendingAssociatedRemote<SharedStorageWorkletServiceClient> client, bool private_aggregation_permissions_policy_allowed, const ::WTF::String& embedder_context) { … }
void SharedStorageWorkletServiceInterceptorForTesting::AddModule(::mojo::PendingRemote<::network::mojom::blink::URLLoaderFactory> url_loader_factory, const ::blink::KURL& script_source_url, AddModuleCallback callback) { … }
void SharedStorageWorkletServiceInterceptorForTesting::RunURLSelectionOperation(const WTF::String& name, const WTF::Vector<::blink::KURL>& urls, ::blink::BlinkCloneableMessage serialized_data, PrivateAggregationOperationDetailsPtr pa_operation_details, RunURLSelectionOperationCallback callback) { … }
void SharedStorageWorkletServiceInterceptorForTesting::RunOperation(const WTF::String& name, ::blink::BlinkCloneableMessage serialized_data, PrivateAggregationOperationDetailsPtr pa_operation_details, RunOperationCallback callback) { … }
SharedStorageWorkletServiceAsyncWaiter::SharedStorageWorkletServiceAsyncWaiter(
SharedStorageWorkletService* proxy) : … { … }
SharedStorageWorkletServiceAsyncWaiter::~SharedStorageWorkletServiceAsyncWaiter() = default;
void SharedStorageWorkletServiceAsyncWaiter::AddModule(
::mojo::PendingRemote<::network::mojom::blink::URLLoaderFactory> url_loader_factory, const ::blink::KURL& script_source_url, bool* out_success, WTF::String* out_error_message) { … }
void SharedStorageWorkletServiceAsyncWaiter::RunURLSelectionOperation(
const WTF::String& name, const WTF::Vector<::blink::KURL>& urls, ::blink::BlinkCloneableMessage serialized_data, PrivateAggregationOperationDetailsPtr pa_operation_details, bool* out_success, WTF::String* out_error_message, uint32_t* out_index) { … }
void SharedStorageWorkletServiceAsyncWaiter::RunOperation(
const WTF::String& name, ::blink::BlinkCloneableMessage serialized_data, PrivateAggregationOperationDetailsPtr pa_operation_details, bool* out_success, WTF::String* out_error_message) { … }
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif