#include "components/services/storage/dom_storage/session_storage_namespace_impl.h"
#include <memory>
#include <utility>
#include "base/functional/bind.h"
#include "base/not_fatal_until.h"
#include "base/ranges/algorithm.h"
namespace storage {
namespace {
void SessionStorageResponse(base::OnceClosure callback, bool success) { … }
}
SessionStorageNamespaceImpl::SessionStorageNamespaceImpl(
std::string namespace_id,
SessionStorageDataMap::Listener* data_map_listener,
SessionStorageAreaImpl::RegisterNewAreaMap register_new_map_callback,
Delegate* delegate)
: … { … }
SessionStorageNamespaceImpl::~SessionStorageNamespaceImpl() { … }
void SessionStorageNamespaceImpl::SetPendingPopulationFromParentNamespace(
const std::string& from_namespace) { … }
void SessionStorageNamespaceImpl::AddChildNamespaceWaitingForClone(
const std::string& namespace_id) { … }
bool SessionStorageNamespaceImpl::HasChildNamespacesWaitingForClone() const { … }
void SessionStorageNamespaceImpl::ClearChildNamespacesWaitingForClone() { … }
bool SessionStorageNamespaceImpl::HasAreaForStorageKey(
const blink::StorageKey& storage_key) const { … }
void SessionStorageNamespaceImpl::PopulateFromMetadata(
AsyncDomStorageDatabase* database,
SessionStorageMetadata::NamespaceEntry namespace_metadata) { … }
void SessionStorageNamespaceImpl::PopulateAsClone(
AsyncDomStorageDatabase* database,
SessionStorageMetadata::NamespaceEntry namespace_metadata,
const StorageKeyAreas& areas_to_clone) { … }
void SessionStorageNamespaceImpl::Reset() { … }
void SessionStorageNamespaceImpl::Bind(
mojo::PendingReceiver<blink::mojom::SessionStorageNamespace> receiver) { … }
void SessionStorageNamespaceImpl::PurgeUnboundAreas() { … }
void SessionStorageNamespaceImpl::RemoveStorageKeyData(
const blink::StorageKey& storage_key,
base::OnceClosure callback) { … }
void SessionStorageNamespaceImpl::OpenArea(
const blink::StorageKey& storage_key,
mojo::PendingReceiver<blink::mojom::StorageArea> receiver) { … }
void SessionStorageNamespaceImpl::Clone(const std::string& clone_to_namespace) { … }
void SessionStorageNamespaceImpl::CloneAllNamespacesWaitingForClone(
AsyncDomStorageDatabase* database,
SessionStorageMetadata* metadata,
const std::map<std::string, std::unique_ptr<SessionStorageNamespaceImpl>>&
namespaces_map) { … }
void SessionStorageNamespaceImpl::FlushAreasForTesting() { … }
void SessionStorageNamespaceImpl::FlushStorageKeyForTesting(
const blink::StorageKey& storage_key) { … }
}