LibDatabase+LibWebView: Extract our SQLite wrapper to its own library

It currently lives in LibWebView as it was only used for cookies and
local storage, both of which are managed in the UI process. Let's move
it to its own library now to allow other processes to use it, without
having to depend on LibWebView (and therefore LibWeb).
This commit is contained in:
Timothy Flynn 2025-10-07 14:35:22 -04:00 committed by Andreas Kling
parent e433dee543
commit 187d02c45d
Notes: github-actions[bot] 2025-10-14 11:42:04 +00:00
13 changed files with 68 additions and 45 deletions

View file

@ -6,6 +6,7 @@
#include <AK/NonnullOwnPtr.h>
#include <AK/StdLibExtras.h>
#include <LibDatabase/Database.h>
#include <LibWebView/StorageJar.h>
namespace WebView {
@ -13,7 +14,7 @@ namespace WebView {
// Quota size is specified in https://storage.spec.whatwg.org/#registered-storage-endpoints
static constexpr size_t LOCAL_STORAGE_QUOTA = 5 * MiB;
ErrorOr<NonnullOwnPtr<StorageJar>> StorageJar::create(Database& database)
ErrorOr<NonnullOwnPtr<StorageJar>> StorageJar::create(Database::Database& database)
{
Statements statements {};