#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
#include "third_party/blink/public/mojom/dom_storage/storage_area.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/dom_storage/storage_area.mojom-params-data.h"
#include "third_party/blink/public/mojom/dom_storage/storage_area.mojom-shared-message-ids.h"
#include "third_party/blink/public/mojom/dom_storage/storage_area.mojom-blink-import-headers.h"
#include "third_party/blink/public/mojom/dom_storage/storage_area.mojom-blink-test-utils.h"
#include "mojo/public/cpp/bindings/lib/wtf_serialization.h"
namespace blink::mojom::blink {
KeyValue::KeyValue()
: … { … }
KeyValue::KeyValue(
WTF::Vector<uint8_t> key_in,
WTF::Vector<uint8_t> value_in)
: … { … }
KeyValue::~KeyValue() = default;
void KeyValue::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool KeyValue::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
const char StorageAreaObserver::Name_[] = …;
StorageAreaObserver::IPCStableHashFunction StorageAreaObserver::MessageToMethodInfo_(mojo::Message& message) { … }
const char* StorageAreaObserver::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t StorageAreaObserver::KeyChanged_Sym::IPCStableHash() { … }
uint32_t StorageAreaObserver::KeyChangeFailed_Sym::IPCStableHash() { … }
uint32_t StorageAreaObserver::KeyDeleted_Sym::IPCStableHash() { … }
uint32_t StorageAreaObserver::AllDeleted_Sym::IPCStableHash() { … }
uint32_t StorageAreaObserver::ShouldSendOldValueOnMutations_Sym::IPCStableHash() { … }
# endif
StorageAreaObserverProxy::StorageAreaObserverProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void StorageAreaObserverProxy::KeyChanged(
const WTF::Vector<uint8_t>& in_key, const WTF::Vector<uint8_t>& in_new_value, const std::optional<WTF::Vector<uint8_t>>& in_old_value, const WTF::String& in_source) { … }
void StorageAreaObserverProxy::KeyChangeFailed(
const WTF::Vector<uint8_t>& in_key, const WTF::String& in_source) { … }
void StorageAreaObserverProxy::KeyDeleted(
const WTF::Vector<uint8_t>& in_key, const std::optional<WTF::Vector<uint8_t>>& in_old_value, const WTF::String& in_source) { … }
void StorageAreaObserverProxy::AllDeleted(
bool in_was_nonempty, const WTF::String& in_source) { … }
void StorageAreaObserverProxy::ShouldSendOldValueOnMutations(
bool in_value) { … }
bool StorageAreaObserverStubDispatch::Accept(
StorageAreaObserver* impl,
mojo::Message* message) { … }
bool StorageAreaObserverStubDispatch::AcceptWithResponder(
StorageAreaObserver* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kStorageAreaObserverValidationInfo[] = …;
bool StorageAreaObserverRequestValidator::Accept(mojo::Message* message) { … }
const char StorageArea::Name_[] = …;
constexpr uint32_t StorageArea::kPerStorageAreaQuota;
constexpr uint32_t StorageArea::kPerStorageAreaOverQuotaAllowance;
StorageArea::IPCStableHashFunction StorageArea::MessageToMethodInfo_(mojo::Message& message) { … }
const char* StorageArea::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t StorageArea::AddObserver_Sym::IPCStableHash() { … }
uint32_t StorageArea::Put_Sym::IPCStableHash() { … }
uint32_t StorageArea::Delete_Sym::IPCStableHash() { … }
uint32_t StorageArea::DeleteAll_Sym::IPCStableHash() { … }
uint32_t StorageArea::Get_Sym::IPCStableHash() { … }
uint32_t StorageArea::GetAll_Sym::IPCStableHash() { … }
uint32_t StorageArea::Checkpoint_Sym::IPCStableHash() { … }
# endif
bool StorageArea::GetAll(::mojo::PendingRemote<StorageAreaObserver> new_observer, WTF::Vector<KeyValuePtr>* out_data) { … }
class StorageArea_Put_ForwardToCallback
: public mojo::MessageReceiver { … };
class StorageArea_Delete_ForwardToCallback
: public mojo::MessageReceiver { … };
class StorageArea_DeleteAll_ForwardToCallback
: public mojo::MessageReceiver { … };
class StorageArea_Get_ForwardToCallback
: public mojo::MessageReceiver { … };
class StorageArea_GetAll_HandleSyncResponse
: public mojo::MessageReceiver { … };
class StorageArea_GetAll_ForwardToCallback
: public mojo::MessageReceiver { … };
StorageAreaProxy::StorageAreaProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void StorageAreaProxy::AddObserver(
::mojo::PendingRemote<StorageAreaObserver> in_observer) { … }
void StorageAreaProxy::Put(
const WTF::Vector<uint8_t>& in_key, const WTF::Vector<uint8_t>& in_value, const std::optional<WTF::Vector<uint8_t>>& in_client_old_value, const WTF::String& in_source, PutCallback callback) { … }
void StorageAreaProxy::Delete(
const WTF::Vector<uint8_t>& in_key, const std::optional<WTF::Vector<uint8_t>>& in_client_old_value, const WTF::String& in_source, DeleteCallback callback) { … }
void StorageAreaProxy::DeleteAll(
const WTF::String& in_source, ::mojo::PendingRemote<StorageAreaObserver> in_new_observer, DeleteAllCallback callback) { … }
void StorageAreaProxy::Get(
const WTF::Vector<uint8_t>& in_key, GetCallback callback) { … }
bool StorageAreaProxy::GetAll(
::mojo::PendingRemote<StorageAreaObserver> param_new_observer, WTF::Vector<KeyValuePtr>* out_param_data) { … }
void StorageAreaProxy::GetAll(
::mojo::PendingRemote<StorageAreaObserver> in_new_observer, GetAllCallback callback) { … }
void StorageAreaProxy::Checkpoint(
) { … }
class StorageArea_Put_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool StorageArea_Put_ForwardToCallback::Accept(
mojo::Message* message) { … }
void StorageArea_Put_ProxyToResponder::Run(
bool in_success) { … }
class StorageArea_Delete_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool StorageArea_Delete_ForwardToCallback::Accept(
mojo::Message* message) { … }
void StorageArea_Delete_ProxyToResponder::Run(
bool in_success) { … }
class StorageArea_DeleteAll_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool StorageArea_DeleteAll_ForwardToCallback::Accept(
mojo::Message* message) { … }
void StorageArea_DeleteAll_ProxyToResponder::Run(
bool in_success) { … }
class StorageArea_Get_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool StorageArea_Get_ForwardToCallback::Accept(
mojo::Message* message) { … }
void StorageArea_Get_ProxyToResponder::Run(
bool in_success, const WTF::Vector<uint8_t>& in_value) { … }
class StorageArea_GetAll_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool StorageArea_GetAll_ForwardToCallback::Accept(
mojo::Message* message) { … }
void StorageArea_GetAll_ProxyToResponder::Run(
WTF::Vector<KeyValuePtr> in_data) { … }
bool StorageArea_GetAll_HandleSyncResponse::Accept(
mojo::Message* message) { … }
bool StorageAreaStubDispatch::Accept(
StorageArea* impl,
mojo::Message* message) { … }
bool StorageAreaStubDispatch::AcceptWithResponder(
StorageArea* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kStorageAreaValidationInfo[] = …;
bool StorageAreaRequestValidator::Accept(mojo::Message* message) { … }
bool StorageAreaResponseValidator::Accept(mojo::Message* message) { … }
}
namespace mojo {
bool StructTraits<::blink::mojom::blink::KeyValue::DataView, ::blink::mojom::blink::KeyValuePtr>::Read(
::blink::mojom::blink::KeyValue::DataView input,
::blink::mojom::blink::KeyValuePtr* output) { … }
}
namespace blink::mojom::blink {
void StorageAreaObserverInterceptorForTesting::KeyChanged(const WTF::Vector<uint8_t>& key, const WTF::Vector<uint8_t>& new_value, const std::optional<WTF::Vector<uint8_t>>& old_value, const WTF::String& source) { … }
void StorageAreaObserverInterceptorForTesting::KeyChangeFailed(const WTF::Vector<uint8_t>& key, const WTF::String& source) { … }
void StorageAreaObserverInterceptorForTesting::KeyDeleted(const WTF::Vector<uint8_t>& key, const std::optional<WTF::Vector<uint8_t>>& old_value, const WTF::String& source) { … }
void StorageAreaObserverInterceptorForTesting::AllDeleted(bool was_nonempty, const WTF::String& source) { … }
void StorageAreaObserverInterceptorForTesting::ShouldSendOldValueOnMutations(bool value) { … }
StorageAreaObserverAsyncWaiter::StorageAreaObserverAsyncWaiter(
StorageAreaObserver* proxy) : … { … }
StorageAreaObserverAsyncWaiter::~StorageAreaObserverAsyncWaiter() = default;
void StorageAreaInterceptorForTesting::AddObserver(::mojo::PendingRemote<StorageAreaObserver> observer) { … }
void StorageAreaInterceptorForTesting::Put(const WTF::Vector<uint8_t>& key, const WTF::Vector<uint8_t>& value, const std::optional<WTF::Vector<uint8_t>>& client_old_value, const WTF::String& source, PutCallback callback) { … }
void StorageAreaInterceptorForTesting::Delete(const WTF::Vector<uint8_t>& key, const std::optional<WTF::Vector<uint8_t>>& client_old_value, const WTF::String& source, DeleteCallback callback) { … }
void StorageAreaInterceptorForTesting::DeleteAll(const WTF::String& source, ::mojo::PendingRemote<StorageAreaObserver> new_observer, DeleteAllCallback callback) { … }
void StorageAreaInterceptorForTesting::Get(const WTF::Vector<uint8_t>& key, GetCallback callback) { … }
void StorageAreaInterceptorForTesting::GetAll(::mojo::PendingRemote<StorageAreaObserver> new_observer, GetAllCallback callback) { … }
void StorageAreaInterceptorForTesting::Checkpoint() { … }
StorageAreaAsyncWaiter::StorageAreaAsyncWaiter(
StorageArea* proxy) : … { … }
StorageAreaAsyncWaiter::~StorageAreaAsyncWaiter() = default;
void StorageAreaAsyncWaiter::Put(
const WTF::Vector<uint8_t>& key, const WTF::Vector<uint8_t>& value, const std::optional<WTF::Vector<uint8_t>>& client_old_value, const WTF::String& source, bool* out_success) { … }
bool StorageAreaAsyncWaiter::Put(
const WTF::Vector<uint8_t>& key, const WTF::Vector<uint8_t>& value, const std::optional<WTF::Vector<uint8_t>>& client_old_value, const WTF::String& source) { … }
void StorageAreaAsyncWaiter::Delete(
const WTF::Vector<uint8_t>& key, const std::optional<WTF::Vector<uint8_t>>& client_old_value, const WTF::String& source, bool* out_success) { … }
bool StorageAreaAsyncWaiter::Delete(
const WTF::Vector<uint8_t>& key, const std::optional<WTF::Vector<uint8_t>>& client_old_value, const WTF::String& source) { … }
void StorageAreaAsyncWaiter::DeleteAll(
const WTF::String& source, ::mojo::PendingRemote<StorageAreaObserver> new_observer, bool* out_success) { … }
bool StorageAreaAsyncWaiter::DeleteAll(
const WTF::String& source, ::mojo::PendingRemote<StorageAreaObserver> new_observer) { … }
void StorageAreaAsyncWaiter::Get(
const WTF::Vector<uint8_t>& key, bool* out_success, WTF::Vector<uint8_t>* out_value) { … }
void StorageAreaAsyncWaiter::GetAll(
::mojo::PendingRemote<StorageAreaObserver> new_observer, WTF::Vector<KeyValuePtr>* out_data) { … }
WTF::Vector<KeyValuePtr> StorageAreaAsyncWaiter::GetAll(
::mojo::PendingRemote<StorageAreaObserver> new_observer) { … }
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif