Ladybird: Hook up the dump-cookies debug request to the cookie jar

This commit is contained in:
Timothy Flynn 2022-09-12 16:25:41 -04:00 committed by Andrew Kaster
parent 0f1644f62d
commit e04db5efed
Notes: sideshowbarker 2024-07-17 03:25:24 +09:00

View file

@ -324,6 +324,11 @@ public:
m_cookie_jar.set_cookie(url, cookie, source);
}
void dump_cookies() const
{
m_cookie_jar.dump_cookies();
}
void request_file(NonnullRefPtr<Web::FileRequest>& request) override
{
auto const file = Core::System::open(request->path(), O_RDONLY);
@ -923,6 +928,9 @@ void WebView::debug_request(String const& request, String const& argument)
if (auto* doc = page.top_level_browsing_context().active_document())
doc->window().local_storage()->dump();
}
if (request == "dump-cookies"sv)
m_page_client->dump_cookies();
}
String WebView::source() const