#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.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-import-headers.h"
#include "third_party/blink/public/mojom/shared_storage/shared_storage.mojom-test-utils.h"
#include "third_party/blink/common/permissions_policy/permissions_policy_mojom_traits.h"
#include "third_party/blink/public/common/messaging/cloneable_message_mojom_traits.h"
namespace blink::mojom {
SharedStorageKeyArgument::SharedStorageKeyArgument()
: … { … }
SharedStorageKeyArgument::SharedStorageKeyArgument(
const ::std::u16string& 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 ::std::u16string& 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 ::GURL& url_in,
const base::flat_map<std::string, ::GURL>& 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 std::optional<::url::Origin>& aggregation_coordinator_origin_in,
const std::optional<std::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 std::string& in_name, std::vector<SharedStorageUrlWithMetadataPtr> in_urls_with_metadata, ::blink::CloneableMessage in_serialized_data, bool in_keep_alive_after_operation, PrivateAggregationConfigPtr in_private_aggregation_config, SelectURLCallback callback) { … }
void SharedStorageWorkletHostProxy::Run(
const std::string& in_name, ::blink::CloneableMessage 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 std::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 std::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 ::GURL& in_script_source_url, const ::url::Origin& in_data_origin, ::network::mojom::CredentialsMode in_credentials_mode, const std::vector<::blink::mojom::OriginTrialFeature>& in_origin_trial_features, ::mojo::PendingAssociatedReceiver<SharedStorageWorkletHost> in_worklet_host, CreateWorkletCallback callback) { … }
void SharedStorageDocumentServiceProxy::SharedStorageGet(
const ::std::u16string& in_key, SharedStorageGetCallback callback) { … }
void SharedStorageDocumentServiceProxy::SharedStorageSet(
const ::std::u16string& in_key, const ::std::u16string& in_value, bool in_ignore_if_present, SharedStorageSetCallback callback) { … }
void SharedStorageDocumentServiceProxy::SharedStorageAppend(
const ::std::u16string& in_key, const ::std::u16string& in_value, SharedStorageAppendCallback callback) { … }
void SharedStorageDocumentServiceProxy::SharedStorageDelete(
const ::std::u16string& 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 std::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 std::string& in_error_message, const ::std::u16string& 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 std::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 std::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 std::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 std::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::SharedStorageKeyArgument::DataView, ::blink::mojom::SharedStorageKeyArgumentPtr>::Read(
::blink::mojom::SharedStorageKeyArgument::DataView input,
::blink::mojom::SharedStorageKeyArgumentPtr* output) { … }
bool StructTraits<::blink::mojom::SharedStorageValueArgument::DataView, ::blink::mojom::SharedStorageValueArgumentPtr>::Read(
::blink::mojom::SharedStorageValueArgument::DataView input,
::blink::mojom::SharedStorageValueArgumentPtr* output) { … }
bool StructTraits<::blink::mojom::SharedStorageUrlWithMetadata::DataView, ::blink::mojom::SharedStorageUrlWithMetadataPtr>::Read(
::blink::mojom::SharedStorageUrlWithMetadata::DataView input,
::blink::mojom::SharedStorageUrlWithMetadataPtr* output) { … }
bool StructTraits<::blink::mojom::PrivateAggregationConfig::DataView, ::blink::mojom::PrivateAggregationConfigPtr>::Read(
::blink::mojom::PrivateAggregationConfig::DataView input,
::blink::mojom::PrivateAggregationConfigPtr* output) { … }
}
namespace blink::mojom {
void SharedStorageWorkletHostInterceptorForTesting::SelectURL(const std::string& name, std::vector<SharedStorageUrlWithMetadataPtr> urls_with_metadata, ::blink::CloneableMessage serialized_data, bool keep_alive_after_operation, PrivateAggregationConfigPtr private_aggregation_config, SelectURLCallback callback) { … }
void SharedStorageWorkletHostInterceptorForTesting::Run(const std::string& name, ::blink::CloneableMessage serialized_data, bool keep_alive_after_operation, PrivateAggregationConfigPtr private_aggregation_config, RunCallback callback) { … }
SharedStorageWorkletHostAsyncWaiter::SharedStorageWorkletHostAsyncWaiter(
SharedStorageWorkletHost* proxy) : … { … }
SharedStorageWorkletHostAsyncWaiter::~SharedStorageWorkletHostAsyncWaiter() = default;
void SharedStorageWorkletHostAsyncWaiter::SelectURL(
const std::string& name, std::vector<SharedStorageUrlWithMetadataPtr> urls_with_metadata, ::blink::CloneableMessage serialized_data, bool keep_alive_after_operation, PrivateAggregationConfigPtr private_aggregation_config, bool* out_success, std::string* out_error_message, std::optional<::blink::FencedFrame::RedactedFencedFrameConfig>* out_config) { … }
void SharedStorageWorkletHostAsyncWaiter::Run(
const std::string& name, ::blink::CloneableMessage serialized_data, bool keep_alive_after_operation, PrivateAggregationConfigPtr private_aggregation_config, bool* out_success, std::string* out_error_message) { … }
void SharedStorageDocumentServiceInterceptorForTesting::CreateWorklet(const ::GURL& script_source_url, const ::url::Origin& data_origin, ::network::mojom::CredentialsMode credentials_mode, const std::vector<::blink::mojom::OriginTrialFeature>& origin_trial_features, ::mojo::PendingAssociatedReceiver<SharedStorageWorkletHost> worklet_host, CreateWorkletCallback callback) { … }
void SharedStorageDocumentServiceInterceptorForTesting::SharedStorageGet(const ::std::u16string& key, SharedStorageGetCallback callback) { … }
void SharedStorageDocumentServiceInterceptorForTesting::SharedStorageSet(const ::std::u16string& key, const ::std::u16string& value, bool ignore_if_present, SharedStorageSetCallback callback) { … }
void SharedStorageDocumentServiceInterceptorForTesting::SharedStorageAppend(const ::std::u16string& key, const ::std::u16string& value, SharedStorageAppendCallback callback) { … }
void SharedStorageDocumentServiceInterceptorForTesting::SharedStorageDelete(const ::std::u16string& key, SharedStorageDeleteCallback callback) { … }
void SharedStorageDocumentServiceInterceptorForTesting::SharedStorageClear(SharedStorageClearCallback callback) { … }
SharedStorageDocumentServiceAsyncWaiter::SharedStorageDocumentServiceAsyncWaiter(
SharedStorageDocumentService* proxy) : … { … }
SharedStorageDocumentServiceAsyncWaiter::~SharedStorageDocumentServiceAsyncWaiter() = default;
void SharedStorageDocumentServiceAsyncWaiter::CreateWorklet(
const ::GURL& script_source_url, const ::url::Origin& data_origin, ::network::mojom::CredentialsMode credentials_mode, const std::vector<::blink::mojom::OriginTrialFeature>& origin_trial_features, ::mojo::PendingAssociatedReceiver<SharedStorageWorkletHost> worklet_host, bool* out_success, std::string* out_error_message) { … }
void SharedStorageDocumentServiceAsyncWaiter::SharedStorageGet(
const ::std::u16string& key, SharedStorageGetStatus* out_status, std::string* out_error_message, ::std::u16string* out_value) { … }
void SharedStorageDocumentServiceAsyncWaiter::SharedStorageSet(
const ::std::u16string& key, const ::std::u16string& value, bool ignore_if_present, bool* out_success, std::string* out_error_message) { … }
void SharedStorageDocumentServiceAsyncWaiter::SharedStorageAppend(
const ::std::u16string& key, const ::std::u16string& value, bool* out_success, std::string* out_error_message) { … }
void SharedStorageDocumentServiceAsyncWaiter::SharedStorageDelete(
const ::std::u16string& key, bool* out_success, std::string* out_error_message) { … }
void SharedStorageDocumentServiceAsyncWaiter::SharedStorageClear(
bool* out_success, std::string* out_error_message) { … }
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif