diff options
author | Andreas Kling <kling@serenityos.org> | 2022-04-10 01:37:11 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-04-10 01:37:45 +0200 |
commit | 9ed5a14af2569f1e983d7592d6a3d07d038a502d (patch) | |
tree | b3d214303b54890fdcaf0addf0e97aa0e71846a9 /Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp | |
parent | db2b67dc5e9cedb2e93fbd630b372c6e5a4048b0 (diff) | |
download | serenity-9ed5a14af2569f1e983d7592d6a3d07d038a502d.zip |
LibWeb: Remove unused ResourceLoader::load_sync()
There are no remaining users of this API, everyone has been migrated
to asynchronous resource loading.
Diffstat (limited to 'Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp b/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp index 730354508b..217b918213 100644 --- a/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp +++ b/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp @@ -42,25 +42,6 @@ ResourceLoader::ResourceLoader(NonnullRefPtr<Protocol::RequestClient> protocol_c { } -void ResourceLoader::load_sync(LoadRequest& request, Function<void(ReadonlyBytes, HashMap<String, String, CaseInsensitiveStringTraits> const& response_headers, Optional<u32> status_code)> success_callback, Function<void(String const&, Optional<u32> status_code)> error_callback) -{ - Core::EventLoop loop; - - load( - request, - [&](auto data, auto& response_headers, auto status_code) { - success_callback(data, response_headers, status_code); - loop.quit(0); - }, - [&](auto& string, auto status_code) { - if (error_callback) - error_callback(string, status_code); - loop.quit(0); - }); - - loop.exec(); -} - void ResourceLoader::prefetch_dns(AK::URL const& url) { m_protocol_client->ensure_connection(url, RequestServer::CacheLevel::ResolveOnly); |