#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.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.mojom-params-data.h"
#include "third_party/blink/public/mojom/shared_storage/shared_storage.mojom-shared-message-ids.h"
#include "third_party/blink/public/mojom/shared_storage/shared_storage.mojom-blink-import-headers.h"
#include "third_party/blink/public/mojom/shared_storage/shared_storage.mojom-blink-test-utils.h"
#include "mojo/public/cpp/bindings/lib/wtf_serialization.h"
#include "third_party/blink/common/permissions_policy/permissions_policy_mojom_traits.h"
namespace blink::mojom::blink {
SharedStorageKeyArgument::SharedStorageKeyArgument()
: … { … }
SharedStorageKeyArgument::SharedStorageKeyArgument(
const ::WTF::String& data_in)
: … { … }
SharedStorageKeyArgument::~SharedStorageKeyArgument() = default;
void SharedStorageKeyArgument::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool SharedStorageKeyArgument::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
SharedStorageValueArgument::SharedStorageValueArgument()
: … { … }
SharedStorageValueArgument::SharedStorageValueArgument(
const ::WTF::String& data_in)
: … { … }
SharedStorageValueArgument::~SharedStorageValueArgument() = default;
void SharedStorageValueArgument::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool SharedStorageValueArgument::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
SharedStorageUrlWithMetadata::SharedStorageUrlWithMetadata()
: … { … }
SharedStorageUrlWithMetadata::SharedStorageUrlWithMetadata(
const ::blink::KURL& url_in,
const WTF::HashMap<WTF::String, ::blink::KURL>& reporting_metadata_in)
: … { … }
SharedStorageUrlWithMetadata::~SharedStorageUrlWithMetadata() = default;
void SharedStorageUrlWithMetadata::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool SharedStorageUrlWithMetadata::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
PrivateAggregationConfig::PrivateAggregationConfig()
: … { … }
PrivateAggregationConfig::PrivateAggregationConfig(
const ::scoped_refptr<const ::blink::SecurityOrigin>& aggregation_coordinator_origin_in,
const WTF::String& context_id_in,
uint32_t filtering_id_max_bytes_in)
: … { … }
PrivateAggregationConfig::~PrivateAggregationConfig() = default;
void PrivateAggregationConfig::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool PrivateAggregationConfig::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
const char SharedStorageWorkletHost::Name_[] = …;
SharedStorageWorkletHost::IPCStableHashFunction SharedStorageWorkletHost::MessageToMethodInfo_(mojo::Message& message) { … }
const char* SharedStorageWorkletHost::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t SharedStorageWorkletHost::SelectURL_Sym::IPCStableHash() { … }
uint32_t SharedStorageWorkletHost::Run_Sym::IPCStableHash() { … }
# endif
class SharedStorageWorkletHost_SelectURL_ForwardToCallback
: public mojo::MessageReceiver { … };
class SharedStorageWorkletHost_Run_ForwardToCallback
: public mojo::MessageReceiver { … };
SharedStorageWorkletHostProxy::SharedStorageWorkletHostProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void SharedStorageWorkletHostProxy::SelectURL(
const WTF::String& in_name, WTF::Vector<SharedStorageUrlWithMetadataPtr> in_urls_with_metadata, ::blink::BlinkCloneableMessage in_serialized_data, bool in_keep_alive_after_operation, PrivateAggregationConfigPtr in_private_aggregation_config, SelectURLCallback callback) { … }
void SharedStorageWorkletHostProxy::Run(
const WTF::String& in_name, ::blink::BlinkCloneableMessage in_serialized_data, bool in_keep_alive_after_operation, PrivateAggregationConfigPtr in_private_aggregation_config, RunCallback callback) { … }
class SharedStorageWorkletHost_SelectURL_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool SharedStorageWorkletHost_SelectURL_ForwardToCallback::Accept(
mojo::Message* message) { … }
void SharedStorageWorkletHost_SelectURL_ProxyToResponder::Run(
bool in_success, const WTF::String& in_error_message, const std::optional<::blink::FencedFrame::RedactedFencedFrameConfig>& in_config) { … }
class SharedStorageWorkletHost_Run_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool SharedStorageWorkletHost_Run_ForwardToCallback::Accept(
mojo::Message* message) { … }
void SharedStorageWorkletHost_Run_ProxyToResponder::Run(
bool in_success, const WTF::String& in_error_message) { … }
bool SharedStorageWorkletHostStubDispatch::Accept(
SharedStorageWorkletHost* impl,
mojo::Message* message) { … }
bool SharedStorageWorkletHostStubDispatch::AcceptWithResponder(
SharedStorageWorkletHost* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kSharedStorageWorkletHostValidationInfo[] = …;
bool SharedStorageWorkletHostRequestValidator::Accept(mojo::Message* message) { … }
bool SharedStorageWorkletHostResponseValidator::Accept(mojo::Message* message) { … }
const char SharedStorageDocumentService::Name_[] = …;
SharedStorageDocumentService::IPCStableHashFunction SharedStorageDocumentService::MessageToMethodInfo_(mojo::Message& message) { … }
const char* SharedStorageDocumentService::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t SharedStorageDocumentService::CreateWorklet_Sym::IPCStableHash() { … }
uint32_t SharedStorageDocumentService::SharedStorageGet_Sym::IPCStableHash() { … }
uint32_t SharedStorageDocumentService::SharedStorageSet_Sym::IPCStableHash() { … }
uint32_t SharedStorageDocumentService::SharedStorageAppend_Sym::IPCStableHash() { … }
uint32_t SharedStorageDocumentService::SharedStorageDelete_Sym::IPCStableHash() { … }
uint32_t SharedStorageDocumentService::SharedStorageClear_Sym::IPCStableHash() { … }
# endif
class SharedStorageDocumentService_CreateWorklet_ForwardToCallback
: public mojo::MessageReceiver { … };
class SharedStorageDocumentService_SharedStorageGet_ForwardToCallback
: public mojo::MessageReceiver { … };
class SharedStorageDocumentService_SharedStorageSet_ForwardToCallback
: public mojo::MessageReceiver { … };
class SharedStorageDocumentService_SharedStorageAppend_ForwardToCallback
: public mojo::MessageReceiver { … };
class SharedStorageDocumentService_SharedStorageDelete_ForwardToCallback
: public mojo::MessageReceiver { … };
class SharedStorageDocumentService_SharedStorageClear_ForwardToCallback
: public mojo::MessageReceiver { … };
SharedStorageDocumentServiceProxy::SharedStorageDocumentServiceProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void SharedStorageDocumentServiceProxy::CreateWorklet(
const ::blink::KURL& in_script_source_url, const ::scoped_refptr<const ::blink::SecurityOrigin>& in_data_origin, ::network::mojom::blink::CredentialsMode in_credentials_mode, const WTF::Vector<::blink::mojom::blink::OriginTrialFeature>& in_origin_trial_features, ::mojo::PendingAssociatedReceiver<SharedStorageWorkletHost> in_worklet_host, CreateWorkletCallback callback) { … }
void SharedStorageDocumentServiceProxy::SharedStorageGet(
const ::WTF::String& in_key, SharedStorageGetCallback callback) { … }
void SharedStorageDocumentServiceProxy::SharedStorageSet(
const ::WTF::String& in_key, const ::WTF::String& in_value, bool in_ignore_if_present, SharedStorageSetCallback callback) { … }
void SharedStorageDocumentServiceProxy::SharedStorageAppend(
const ::WTF::String& in_key, const ::WTF::String& in_value, SharedStorageAppendCallback callback) { … }
void SharedStorageDocumentServiceProxy::SharedStorageDelete(
const ::WTF::String& in_key, SharedStorageDeleteCallback callback) { … }
void SharedStorageDocumentServiceProxy::SharedStorageClear(
SharedStorageClearCallback callback) { … }
class SharedStorageDocumentService_CreateWorklet_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool SharedStorageDocumentService_CreateWorklet_ForwardToCallback::Accept(
mojo::Message* message) { … }
void SharedStorageDocumentService_CreateWorklet_ProxyToResponder::Run(
bool in_success, const WTF::String& in_error_message) { … }
class SharedStorageDocumentService_SharedStorageGet_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool SharedStorageDocumentService_SharedStorageGet_ForwardToCallback::Accept(
mojo::Message* message) { … }
void SharedStorageDocumentService_SharedStorageGet_ProxyToResponder::Run(
SharedStorageGetStatus in_status, const WTF::String& in_error_message, const ::WTF::String& in_value) { … }
class SharedStorageDocumentService_SharedStorageSet_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool SharedStorageDocumentService_SharedStorageSet_ForwardToCallback::Accept(
mojo::Message* message) { … }
void SharedStorageDocumentService_SharedStorageSet_ProxyToResponder::Run(
bool in_success, const WTF::String& in_error_message) { … }
class SharedStorageDocumentService_SharedStorageAppend_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool SharedStorageDocumentService_SharedStorageAppend_ForwardToCallback::Accept(
mojo::Message* message) { … }
void SharedStorageDocumentService_SharedStorageAppend_ProxyToResponder::Run(
bool in_success, const WTF::String& in_error_message) { … }
class SharedStorageDocumentService_SharedStorageDelete_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool SharedStorageDocumentService_SharedStorageDelete_ForwardToCallback::Accept(
mojo::Message* message) { … }
void SharedStorageDocumentService_SharedStorageDelete_ProxyToResponder::Run(
bool in_success, const WTF::String& in_error_message) { … }
class SharedStorageDocumentService_SharedStorageClear_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool SharedStorageDocumentService_SharedStorageClear_ForwardToCallback::Accept(
mojo::Message* message) { … }
void SharedStorageDocumentService_SharedStorageClear_ProxyToResponder::Run(
bool in_success, const WTF::String& in_error_message) { … }
bool SharedStorageDocumentServiceStubDispatch::Accept(
SharedStorageDocumentService* impl,
mojo::Message* message) { … }
bool SharedStorageDocumentServiceStubDispatch::AcceptWithResponder(
SharedStorageDocumentService* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kSharedStorageDocumentServiceValidationInfo[] = …;
bool SharedStorageDocumentServiceRequestValidator::Accept(mojo::Message* message) { … }
bool SharedStorageDocumentServiceResponseValidator::Accept(mojo::Message* message) { … }
}
namespace mojo {
bool StructTraits<::blink::mojom::blink::SharedStorageKeyArgument::DataView, ::blink::mojom::blink::SharedStorageKeyArgumentPtr>::Read(
::blink::mojom::blink::SharedStorageKeyArgument::DataView input,
::blink::mojom::blink::SharedStorageKeyArgumentPtr* output) { … }
bool StructTraits<::blink::mojom::blink::SharedStorageValueArgument::DataView, ::blink::mojom::blink::SharedStorageValueArgumentPtr>::Read(
::blink::mojom::blink::SharedStorageValueArgument::DataView input,
::blink::mojom::blink::SharedStorageValueArgumentPtr* output) { … }
bool StructTraits<::blink::mojom::blink::SharedStorageUrlWithMetadata::DataView, ::blink::mojom::blink::SharedStorageUrlWithMetadataPtr>::Read(
::blink::mojom::blink::SharedStorageUrlWithMetadata::DataView input,
::blink::mojom::blink::SharedStorageUrlWithMetadataPtr* output) { … }
bool StructTraits<::blink::mojom::blink::PrivateAggregationConfig::DataView, ::blink::mojom::blink::PrivateAggregationConfigPtr>::Read(
::blink::mojom::blink::PrivateAggregationConfig::DataView input,
::blink::mojom::blink::PrivateAggregationConfigPtr* output) { … }
}
namespace blink::mojom::blink {
void SharedStorageWorkletHostInterceptorForTesting::SelectURL(const WTF::String& name, WTF::Vector<SharedStorageUrlWithMetadataPtr> urls_with_metadata, ::blink::BlinkCloneableMessage serialized_data, bool keep_alive_after_operation, PrivateAggregationConfigPtr private_aggregation_config, SelectURLCallback callback) { … }
void SharedStorageWorkletHostInterceptorForTesting::Run(const WTF::String& name, ::blink::BlinkCloneableMessage serialized_data, bool keep_alive_after_operation, PrivateAggregationConfigPtr private_aggregation_config, RunCallback callback) { … }
SharedStorageWorkletHostAsyncWaiter::SharedStorageWorkletHostAsyncWaiter(
SharedStorageWorkletHost* proxy) : … { … }
SharedStorageWorkletHostAsyncWaiter::~SharedStorageWorkletHostAsyncWaiter() = default;
void SharedStorageWorkletHostAsyncWaiter::SelectURL(
const WTF::String& name, WTF::Vector<SharedStorageUrlWithMetadataPtr> urls_with_metadata, ::blink::BlinkCloneableMessage serialized_data, bool keep_alive_after_operation, PrivateAggregationConfigPtr private_aggregation_config, bool* out_success, WTF::String* out_error_message, std::optional<::blink::FencedFrame::RedactedFencedFrameConfig>* out_config) { … }
void SharedStorageWorkletHostAsyncWaiter::Run(
const WTF::String& name, ::blink::BlinkCloneableMessage serialized_data, bool keep_alive_after_operation, PrivateAggregationConfigPtr private_aggregation_config, bool* out_success, WTF::String* out_error_message) { … }
void SharedStorageDocumentServiceInterceptorForTesting::CreateWorklet(const ::blink::KURL& script_source_url, const ::scoped_refptr<const ::blink::SecurityOrigin>& data_origin, ::network::mojom::blink::CredentialsMode credentials_mode, const WTF::Vector<::blink::mojom::blink::OriginTrialFeature>& origin_trial_features, ::mojo::PendingAssociatedReceiver<SharedStorageWorkletHost> worklet_host, CreateWorkletCallback callback) { … }
void SharedStorageDocumentServiceInterceptorForTesting::SharedStorageGet(const ::WTF::String& key, SharedStorageGetCallback callback) { … }
void SharedStorageDocumentServiceInterceptorForTesting::SharedStorageSet(const ::WTF::String& key, const ::WTF::String& value, bool ignore_if_present, SharedStorageSetCallback callback) { … }
void SharedStorageDocumentServiceInterceptorForTesting::SharedStorageAppend(const ::WTF::String& key, const ::WTF::String& value, SharedStorageAppendCallback callback) { … }
void SharedStorageDocumentServiceInterceptorForTesting::SharedStorageDelete(const ::WTF::String& key, SharedStorageDeleteCallback callback) { … }
void SharedStorageDocumentServiceInterceptorForTesting::SharedStorageClear(SharedStorageClearCallback callback) { … }
SharedStorageDocumentServiceAsyncWaiter::SharedStorageDocumentServiceAsyncWaiter(
SharedStorageDocumentService* proxy) : … { … }
SharedStorageDocumentServiceAsyncWaiter::~SharedStorageDocumentServiceAsyncWaiter() = default;
void SharedStorageDocumentServiceAsyncWaiter::CreateWorklet(
const ::blink::KURL& script_source_url, const ::scoped_refptr<const ::blink::SecurityOrigin>& data_origin, ::network::mojom::blink::CredentialsMode credentials_mode, const WTF::Vector<::blink::mojom::blink::OriginTrialFeature>& origin_trial_features, ::mojo::PendingAssociatedReceiver<SharedStorageWorkletHost> worklet_host, bool* out_success, WTF::String* out_error_message) { … }
void SharedStorageDocumentServiceAsyncWaiter::SharedStorageGet(
const ::WTF::String& key, SharedStorageGetStatus* out_status, WTF::String* out_error_message, ::WTF::String* out_value) { … }
void SharedStorageDocumentServiceAsyncWaiter::SharedStorageSet(
const ::WTF::String& key, const ::WTF::String& value, bool ignore_if_present, bool* out_success, WTF::String* out_error_message) { … }
void SharedStorageDocumentServiceAsyncWaiter::SharedStorageAppend(
const ::WTF::String& key, const ::WTF::String& value, bool* out_success, WTF::String* out_error_message) { … }
void SharedStorageDocumentServiceAsyncWaiter::SharedStorageDelete(
const ::WTF::String& key, bool* out_success, WTF::String* out_error_message) { … }
void SharedStorageDocumentServiceAsyncWaiter::SharedStorageClear(
bool* out_success, WTF::String* out_error_message) { … }
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif