2024-12-26 11:56:03 +13:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2024-2025, Shannon Booth <shannon@serenityos.org>
|
2025-06-08 23:35:46 +02:00
|
|
|
* Copyright (c) 2025, Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
|
2024-12-26 11:56:03 +13:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <LibWeb/StorageAPI/StorageEndpoint.h>
|
|
|
|
|
|
|
|
namespace Web::StorageAPI {
|
|
|
|
|
|
|
|
ReadonlySpan<StorageEndpoint> StorageEndpoint::registered_endpoints()
|
|
|
|
{
|
|
|
|
// https://storage.spec.whatwg.org/#registered-storage-endpoints
|
|
|
|
static auto const endpoints = to_array<StorageEndpoint>({
|
2025-06-08 23:35:46 +02:00
|
|
|
{ StorageEndpointType::Caches, StorageType::Local, {} },
|
|
|
|
{ StorageEndpointType::IndexedDB, StorageType::Local, {} },
|
|
|
|
{ StorageEndpointType::LocalStorage, StorageType::Local, LOCAL_STORAGE_QUOTA },
|
|
|
|
{ StorageEndpointType::ServiceWorkerRegistrations, StorageType::Local, {} },
|
|
|
|
{ StorageEndpointType::SessionStorage, StorageType::Session, SESSION_STORAGE_QUOTA },
|
2024-12-26 11:56:03 +13:00
|
|
|
});
|
|
|
|
return endpoints;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|