summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-04-10 01:37:11 +0200
committerAndreas Kling <kling@serenityos.org>2022-04-10 01:37:45 +0200
commit9ed5a14af2569f1e983d7592d6a3d07d038a502d (patch)
treeb3d214303b54890fdcaf0addf0e97aa0e71846a9 /Userland
parentdb2b67dc5e9cedb2e93fbd630b372c6e5a4048b0 (diff)
downloadserenity-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')
-rw-r--r--Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp19
-rw-r--r--Userland/Libraries/LibWeb/Loader/ResourceLoader.h1
2 files changed, 0 insertions, 20 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);
diff --git a/Userland/Libraries/LibWeb/Loader/ResourceLoader.h b/Userland/Libraries/LibWeb/Loader/ResourceLoader.h
index 0f3f7f592c..59cce5bd75 100644
--- a/Userland/Libraries/LibWeb/Loader/ResourceLoader.h
+++ b/Userland/Libraries/LibWeb/Loader/ResourceLoader.h
@@ -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&);