#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
#include "components/services/storage/public/mojom/session_storage_control.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 "components/services/storage/public/mojom/session_storage_control.mojom-params-data.h"
#include "components/services/storage/public/mojom/session_storage_control.mojom-shared-message-ids.h"
#include "components/services/storage/public/mojom/session_storage_control.mojom-import-headers.h"
#include "components/services/storage/public/mojom/session_storage_control.mojom-test-utils.h"
namespace storage::mojom {
SessionStorageUsageInfo::SessionStorageUsageInfo()
: … { … }
SessionStorageUsageInfo::SessionStorageUsageInfo(
const ::blink::StorageKey& storage_key_in,
const std::string& namespace_id_in)
: … { … }
SessionStorageUsageInfo::~SessionStorageUsageInfo() = default;
void SessionStorageUsageInfo::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool SessionStorageUsageInfo::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
const char SessionStorageControl::Name_[] = …;
SessionStorageControl::IPCStableHashFunction SessionStorageControl::MessageToMethodInfo_(mojo::Message& message) { … }
const char* SessionStorageControl::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t SessionStorageControl::BindNamespace_Sym::IPCStableHash() { … }
uint32_t SessionStorageControl::BindStorageArea_Sym::IPCStableHash() { … }
uint32_t SessionStorageControl::GetUsage_Sym::IPCStableHash() { … }
uint32_t SessionStorageControl::DeleteStorage_Sym::IPCStableHash() { … }
uint32_t SessionStorageControl::CleanUpStorage_Sym::IPCStableHash() { … }
uint32_t SessionStorageControl::ScavengeUnusedNamespaces_Sym::IPCStableHash() { … }
uint32_t SessionStorageControl::Flush_Sym::IPCStableHash() { … }
uint32_t SessionStorageControl::PurgeMemory_Sym::IPCStableHash() { … }
uint32_t SessionStorageControl::CreateNamespace_Sym::IPCStableHash() { … }
uint32_t SessionStorageControl::CloneNamespace_Sym::IPCStableHash() { … }
uint32_t SessionStorageControl::DeleteNamespace_Sym::IPCStableHash() { … }
# endif
class SessionStorageControl_BindNamespace_ForwardToCallback
: public mojo::MessageReceiver { … };
class SessionStorageControl_BindStorageArea_ForwardToCallback
: public mojo::MessageReceiver { … };
class SessionStorageControl_GetUsage_ForwardToCallback
: public mojo::MessageReceiver { … };
class SessionStorageControl_DeleteStorage_ForwardToCallback
: public mojo::MessageReceiver { … };
class SessionStorageControl_CleanUpStorage_ForwardToCallback
: public mojo::MessageReceiver { … };
class SessionStorageControl_ScavengeUnusedNamespaces_ForwardToCallback
: public mojo::MessageReceiver { … };
SessionStorageControlProxy::SessionStorageControlProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void SessionStorageControlProxy::BindNamespace(
const std::string& in_namespace_id, ::mojo::PendingReceiver<::blink::mojom::SessionStorageNamespace> in_receiver, BindNamespaceCallback callback) { … }
void SessionStorageControlProxy::BindStorageArea(
const ::blink::StorageKey& in_storage_key, const std::string& in_namespace_id, ::mojo::PendingReceiver<::blink::mojom::StorageArea> in_receiver, BindStorageAreaCallback callback) { … }
void SessionStorageControlProxy::GetUsage(
GetUsageCallback callback) { … }
void SessionStorageControlProxy::DeleteStorage(
const ::blink::StorageKey& in_storage_key, const std::string& in_namespace_id, DeleteStorageCallback callback) { … }
void SessionStorageControlProxy::CleanUpStorage(
CleanUpStorageCallback callback) { … }
void SessionStorageControlProxy::ScavengeUnusedNamespaces(
ScavengeUnusedNamespacesCallback callback) { … }
void SessionStorageControlProxy::Flush(
) { … }
void SessionStorageControlProxy::PurgeMemory(
) { … }
void SessionStorageControlProxy::CreateNamespace(
const std::string& in_namespace_id) { … }
void SessionStorageControlProxy::CloneNamespace(
const std::string& in_namespace_id_to_clone, const std::string& in_clone_namespace_id, SessionStorageCloneType in_clone_type) { … }
void SessionStorageControlProxy::DeleteNamespace(
const std::string& in_namespace_id, bool in_should_persist) { … }
class SessionStorageControl_BindNamespace_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool SessionStorageControl_BindNamespace_ForwardToCallback::Accept(
mojo::Message* message) { … }
void SessionStorageControl_BindNamespace_ProxyToResponder::Run(
bool in_success) { … }
class SessionStorageControl_BindStorageArea_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool SessionStorageControl_BindStorageArea_ForwardToCallback::Accept(
mojo::Message* message) { … }
void SessionStorageControl_BindStorageArea_ProxyToResponder::Run(
bool in_success) { … }
class SessionStorageControl_GetUsage_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool SessionStorageControl_GetUsage_ForwardToCallback::Accept(
mojo::Message* message) { … }
void SessionStorageControl_GetUsage_ProxyToResponder::Run(
std::vector<SessionStorageUsageInfoPtr> in_info) { … }
class SessionStorageControl_DeleteStorage_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool SessionStorageControl_DeleteStorage_ForwardToCallback::Accept(
mojo::Message* message) { … }
void SessionStorageControl_DeleteStorage_ProxyToResponder::Run(
) { … }
class SessionStorageControl_CleanUpStorage_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool SessionStorageControl_CleanUpStorage_ForwardToCallback::Accept(
mojo::Message* message) { … }
void SessionStorageControl_CleanUpStorage_ProxyToResponder::Run(
) { … }
class SessionStorageControl_ScavengeUnusedNamespaces_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool SessionStorageControl_ScavengeUnusedNamespaces_ForwardToCallback::Accept(
mojo::Message* message) { … }
void SessionStorageControl_ScavengeUnusedNamespaces_ProxyToResponder::Run(
) { … }
bool SessionStorageControlStubDispatch::Accept(
SessionStorageControl* impl,
mojo::Message* message) { … }
bool SessionStorageControlStubDispatch::AcceptWithResponder(
SessionStorageControl* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kSessionStorageControlValidationInfo[] = …;
bool SessionStorageControlRequestValidator::Accept(mojo::Message* message) { … }
bool SessionStorageControlResponseValidator::Accept(mojo::Message* message) { … }
}
namespace mojo {
bool StructTraits<::storage::mojom::SessionStorageUsageInfo::DataView, ::storage::mojom::SessionStorageUsageInfoPtr>::Read(
::storage::mojom::SessionStorageUsageInfo::DataView input,
::storage::mojom::SessionStorageUsageInfoPtr* output) { … }
}
namespace storage::mojom {
void SessionStorageControlInterceptorForTesting::BindNamespace(const std::string& namespace_id, ::mojo::PendingReceiver<::blink::mojom::SessionStorageNamespace> receiver, BindNamespaceCallback callback) { … }
void SessionStorageControlInterceptorForTesting::BindStorageArea(const ::blink::StorageKey& storage_key, const std::string& namespace_id, ::mojo::PendingReceiver<::blink::mojom::StorageArea> receiver, BindStorageAreaCallback callback) { … }
void SessionStorageControlInterceptorForTesting::GetUsage(GetUsageCallback callback) { … }
void SessionStorageControlInterceptorForTesting::DeleteStorage(const ::blink::StorageKey& storage_key, const std::string& namespace_id, DeleteStorageCallback callback) { … }
void SessionStorageControlInterceptorForTesting::CleanUpStorage(CleanUpStorageCallback callback) { … }
void SessionStorageControlInterceptorForTesting::ScavengeUnusedNamespaces(ScavengeUnusedNamespacesCallback callback) { … }
void SessionStorageControlInterceptorForTesting::Flush() { … }
void SessionStorageControlInterceptorForTesting::PurgeMemory() { … }
void SessionStorageControlInterceptorForTesting::CreateNamespace(const std::string& namespace_id) { … }
void SessionStorageControlInterceptorForTesting::CloneNamespace(const std::string& namespace_id_to_clone, const std::string& clone_namespace_id, SessionStorageCloneType clone_type) { … }
void SessionStorageControlInterceptorForTesting::DeleteNamespace(const std::string& namespace_id, bool should_persist) { … }
SessionStorageControlAsyncWaiter::SessionStorageControlAsyncWaiter(
SessionStorageControl* proxy) : … { … }
SessionStorageControlAsyncWaiter::~SessionStorageControlAsyncWaiter() = default;
void SessionStorageControlAsyncWaiter::BindNamespace(
const std::string& namespace_id, ::mojo::PendingReceiver<::blink::mojom::SessionStorageNamespace> receiver, bool* out_success) { … }
bool SessionStorageControlAsyncWaiter::BindNamespace(
const std::string& namespace_id, ::mojo::PendingReceiver<::blink::mojom::SessionStorageNamespace> receiver) { … }
void SessionStorageControlAsyncWaiter::BindStorageArea(
const ::blink::StorageKey& storage_key, const std::string& namespace_id, ::mojo::PendingReceiver<::blink::mojom::StorageArea> receiver, bool* out_success) { … }
bool SessionStorageControlAsyncWaiter::BindStorageArea(
const ::blink::StorageKey& storage_key, const std::string& namespace_id, ::mojo::PendingReceiver<::blink::mojom::StorageArea> receiver) { … }
void SessionStorageControlAsyncWaiter::GetUsage(
std::vector<SessionStorageUsageInfoPtr>* out_info) { … }
std::vector<SessionStorageUsageInfoPtr> SessionStorageControlAsyncWaiter::GetUsage(
) { … }
void SessionStorageControlAsyncWaiter::DeleteStorage(
const ::blink::StorageKey& storage_key, const std::string& namespace_id) { … }
void SessionStorageControlAsyncWaiter::CleanUpStorage(
) { … }
void SessionStorageControlAsyncWaiter::ScavengeUnusedNamespaces(
) { … }
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif