Ladybird+LibWebView: Move SQLServer launcher to Ladybird

It previously resided in LibWebView to hide the details of launching a
singleton process. That functionality now lives in LibCore. By moving
this to Ladybird, we will be able to register the process with the task
manager.
This commit is contained in:
Timothy Flynn
2024-04-22 12:31:29 -04:00
committed by Andrew Kaster
parent 76af4503c1
commit f16f89eb32
17 changed files with 41 additions and 27 deletions

View File

@@ -7,10 +7,6 @@
#include <AK/StringView.h>
#include <LibWebView/Database.h>
#if !defined(AK_OS_SERENITY)
# include <LibCore/SingletonProcess.h>
#endif
namespace WebView {
static constexpr auto database_name = "Browser"sv;
@@ -21,16 +17,6 @@ ErrorOr<NonnullRefPtr<Database>> Database::create()
return create(move(sql_client));
}
#if !defined(AK_OS_SERENITY)
ErrorOr<NonnullRefPtr<Database>> Database::create(ReadonlySpan<ByteString> candidate_sql_server_paths)
{
auto [sql_client, _] = TRY(Core::launch_singleton_process<SQL::SQLClient>("SQLServer"sv, candidate_sql_server_paths));
return create(move(sql_client));
}
#endif
ErrorOr<NonnullRefPtr<Database>> Database::create(NonnullRefPtr<SQL::SQLClient> sql_client)
{
auto connection_id = sql_client->connect(database_name);