mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +00:00
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:
committed by
Andrew Kaster
parent
76af4503c1
commit
f16f89eb32
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user