diff --git a/Userland/Libraries/LibWeb/Cookie/ParsedCookie.cpp b/Userland/Libraries/LibWeb/Cookie/ParsedCookie.cpp index 79b4968199..594763afd2 100644 --- a/Userland/Libraries/LibWeb/Cookie/ParsedCookie.cpp +++ b/Userland/Libraries/LibWeb/Cookie/ParsedCookie.cpp @@ -29,7 +29,7 @@ static void on_http_only_attribute(ParsedCookie& parsed_cookie); static void on_same_site_attribute(ParsedCookie& parsed_cookie, StringView attribute_value); static Optional parse_date_time(StringView date_string); -Optional parse_cookie(DeprecatedString const& cookie_string) +Optional parse_cookie(StringView cookie_string) { // https://tools.ietf.org/html/rfc6265#section-5.2 diff --git a/Userland/Libraries/LibWeb/Cookie/ParsedCookie.h b/Userland/Libraries/LibWeb/Cookie/ParsedCookie.h index 1d47121daa..5ffb185fba 100644 --- a/Userland/Libraries/LibWeb/Cookie/ParsedCookie.h +++ b/Userland/Libraries/LibWeb/Cookie/ParsedCookie.h @@ -26,7 +26,7 @@ struct ParsedCookie { bool http_only_attribute_present { false }; }; -Optional parse_cookie(DeprecatedString const& cookie_string); +Optional parse_cookie(StringView cookie_string); } diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp index f3e6a72967..1fbd23eba0 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.cpp +++ b/Userland/Libraries/LibWeb/DOM/Document.cpp @@ -1967,7 +1967,7 @@ DeprecatedString Document::cookie(Cookie::Source source) return {}; } -void Document::set_cookie(DeprecatedString const& cookie_string, Cookie::Source source) +void Document::set_cookie(StringView cookie_string, Cookie::Source source) { auto cookie = Cookie::parse_cookie(cookie_string); if (!cookie.has_value()) diff --git a/Userland/Libraries/LibWeb/DOM/Document.h b/Userland/Libraries/LibWeb/DOM/Document.h index e262f1eb8f..75fad76b84 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.h +++ b/Userland/Libraries/LibWeb/DOM/Document.h @@ -98,7 +98,7 @@ public: JS::GCPtr get_selection() const; DeprecatedString cookie(Cookie::Source = Cookie::Source::NonHttp); - void set_cookie(DeprecatedString const&, Cookie::Source = Cookie::Source::NonHttp); + void set_cookie(StringView, Cookie::Source = Cookie::Source::NonHttp); DeprecatedString referrer() const; void set_referrer(DeprecatedString);