LibWeb: Remove unused ResourceLoader::load_sync()

There are no remaining users of this API, everyone has been migrated
to asynchronous resource loading.
This commit is contained in:
Andreas Kling 2022-04-10 01:37:11 +02:00
parent db2b67dc5e
commit 9ed5a14af2
Notes: sideshowbarker 2024-07-17 14:12:12 +09:00
2 changed files with 0 additions and 20 deletions

View File

@ -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);

View File

@ -35,7 +35,6 @@ public:
void load(LoadRequest&, 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 = nullptr);
void load(const AK::URL&, 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 = nullptr);
void load_sync(LoadRequest&, 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 = nullptr);
void prefetch_dns(AK::URL const&);
void preconnect(AK::URL const&);