diff --git a/Userland/Libraries/LibWeb/Page/Page.h b/Userland/Libraries/LibWeb/Page/Page.h index 8fcab42c31..d08575c207 100644 --- a/Userland/Libraries/LibWeb/Page/Page.h +++ b/Userland/Libraries/LibWeb/Page/Page.h @@ -263,7 +263,7 @@ public: virtual void page_did_request_accept_dialog() { } virtual void page_did_request_dismiss_dialog() { } virtual Vector page_did_request_all_cookies(AK::URL const&) { return {}; } - virtual Optional page_did_request_named_cookie(AK::URL const&, ByteString const&) { return {}; } + virtual Optional page_did_request_named_cookie(AK::URL const&, String const&) { return {}; } virtual String page_did_request_cookie(const AK::URL&, Cookie::Source) { return {}; } virtual void page_did_set_cookie(const AK::URL&, Cookie::ParsedCookie const&, Cookie::Source) { } virtual void page_did_update_cookie(Web::Cookie::Cookie) { } diff --git a/Userland/Libraries/LibWebView/ViewImplementation.h b/Userland/Libraries/LibWebView/ViewImplementation.h index 816158b309..b216e2238d 100644 --- a/Userland/Libraries/LibWebView/ViewImplementation.h +++ b/Userland/Libraries/LibWebView/ViewImplementation.h @@ -152,7 +152,7 @@ public: Function on_received_console_message; Function const& message_types, Vector const& messages)> on_received_console_messages; Function(AK::URL const& url)> on_get_all_cookies; - Function(AK::URL const& url, ByteString const& name)> on_get_named_cookie; + Function(AK::URL const& url, String const& name)> on_get_named_cookie; Function on_get_cookie; Function on_set_cookie; Function on_update_cookie; diff --git a/Userland/Libraries/LibWebView/WebContentClient.cpp b/Userland/Libraries/LibWebView/WebContentClient.cpp index 7b6cf359db..cad693acc6 100644 --- a/Userland/Libraries/LibWebView/WebContentClient.cpp +++ b/Userland/Libraries/LibWebView/WebContentClient.cpp @@ -302,7 +302,7 @@ Messages::WebContentClient::DidRequestAllCookiesResponse WebContentClient::did_r return Vector {}; } -Messages::WebContentClient::DidRequestNamedCookieResponse WebContentClient::did_request_named_cookie(AK::URL const& url, ByteString const& name) +Messages::WebContentClient::DidRequestNamedCookieResponse WebContentClient::did_request_named_cookie(AK::URL const& url, String const& name) { if (m_view.on_get_named_cookie) return m_view.on_get_named_cookie(url, name); diff --git a/Userland/Libraries/LibWebView/WebContentClient.h b/Userland/Libraries/LibWebView/WebContentClient.h index d9385c0f33..891fd99e26 100644 --- a/Userland/Libraries/LibWebView/WebContentClient.h +++ b/Userland/Libraries/LibWebView/WebContentClient.h @@ -69,7 +69,7 @@ private: virtual void did_request_accept_dialog() override; virtual void did_request_dismiss_dialog() override; virtual Messages::WebContentClient::DidRequestAllCookiesResponse did_request_all_cookies(AK::URL const&) override; - virtual Messages::WebContentClient::DidRequestNamedCookieResponse did_request_named_cookie(AK::URL const&, ByteString const&) override; + virtual Messages::WebContentClient::DidRequestNamedCookieResponse did_request_named_cookie(AK::URL const&, String const&) override; virtual Messages::WebContentClient::DidRequestCookieResponse did_request_cookie(AK::URL const&, Web::Cookie::Source) override; virtual void did_set_cookie(AK::URL const&, Web::Cookie::ParsedCookie const&, Web::Cookie::Source) override; virtual void did_update_cookie(Web::Cookie::Cookie const&) override; diff --git a/Userland/Services/WebContent/PageClient.cpp b/Userland/Services/WebContent/PageClient.cpp index c1f57f26cb..3c068deede 100644 --- a/Userland/Services/WebContent/PageClient.cpp +++ b/Userland/Services/WebContent/PageClient.cpp @@ -463,7 +463,7 @@ Vector PageClient::page_did_request_all_cookies(URL const& return client().did_request_all_cookies(url); } -Optional PageClient::page_did_request_named_cookie(URL const& url, ByteString const& name) +Optional PageClient::page_did_request_named_cookie(URL const& url, String const& name) { return client().did_request_named_cookie(url, name); } diff --git a/Userland/Services/WebContent/PageClient.h b/Userland/Services/WebContent/PageClient.h index af63e0d82f..175dd5936c 100644 --- a/Userland/Services/WebContent/PageClient.h +++ b/Userland/Services/WebContent/PageClient.h @@ -113,7 +113,7 @@ private: virtual void page_did_request_dismiss_dialog() override; virtual void page_did_change_favicon(Gfx::Bitmap const&) override; virtual Vector page_did_request_all_cookies(URL const&) override; - virtual Optional page_did_request_named_cookie(URL const&, ByteString const&) override; + virtual Optional page_did_request_named_cookie(URL const&, String const&) override; virtual String page_did_request_cookie(const URL&, Web::Cookie::Source) override; virtual void page_did_set_cookie(const URL&, Web::Cookie::ParsedCookie const&, Web::Cookie::Source) override; virtual void page_did_update_cookie(Web::Cookie::Cookie) override; diff --git a/Userland/Services/WebContent/WebContentClient.ipc b/Userland/Services/WebContent/WebContentClient.ipc index e1b99ecd37..b8371d79f1 100644 --- a/Userland/Services/WebContent/WebContentClient.ipc +++ b/Userland/Services/WebContent/WebContentClient.ipc @@ -53,7 +53,7 @@ endpoint WebContentClient did_change_favicon(Gfx::ShareableBitmap favicon) =| did_request_all_cookies(URL url) => (Vector cookies) - did_request_named_cookie(URL url, ByteString name) => (Optional cookie) + did_request_named_cookie(URL url, String name) => (Optional cookie) did_request_cookie(URL url, Web::Cookie::Source source) => (String cookie) did_set_cookie(URL url, Web::Cookie::ParsedCookie cookie, Web::Cookie::Source source) => () did_update_cookie(Web::Cookie::Cookie cookie) =| diff --git a/Userland/Services/WebContent/WebDriverConnection.cpp b/Userland/Services/WebContent/WebDriverConnection.cpp index deee37d713..9981711f04 100644 --- a/Userland/Services/WebContent/WebDriverConnection.cpp +++ b/Userland/Services/WebContent/WebDriverConnection.cpp @@ -1538,7 +1538,7 @@ Messages::WebDriverClient::GetNamedCookieResponse WebDriverConnection::get_named // 3. If the url variable name is equal to a cookie’s cookie name amongst all associated cookies of the current browsing context’s active document, return success with the serialized cookie as data. auto* document = m_page_client.page().top_level_browsing_context().active_document(); - if (auto cookie = m_page_client.page_did_request_named_cookie(document->url(), name.to_byte_string()); cookie.has_value()) { + if (auto cookie = m_page_client.page_did_request_named_cookie(document->url(), name); cookie.has_value()) { auto serialized_cookie = serialize_cookie(*cookie); return serialized_cookie; }