1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:48:11 +00:00

AK+Everywhere: Rename String to DeprecatedString

We have a new, improved string type coming up in AK (OOM aware, no null
state), and while it's going to use UTF-8, the name UTF8String is a
mouthful - so let's free up the String name by renaming the existing
class.
Making the old one have an annoying name will hopefully also help with
quick adoption :^)
This commit is contained in:
Linus Groh 2022-12-04 18:02:33 +00:00 committed by Andreas Kling
parent f74251606d
commit 6e19ab2bbc
2006 changed files with 11635 additions and 11636 deletions

View file

@ -14,7 +14,7 @@ WebSocketClient::WebSocketClient(NonnullOwnPtr<Core::Stream::LocalSocket> socket
{
}
RefPtr<WebSocket> WebSocketClient::connect(const URL& url, String const& origin, Vector<String> const& protocols, Vector<String> const& extensions, HashMap<String, String> const& request_headers)
RefPtr<WebSocket> WebSocketClient::connect(const URL& url, DeprecatedString const& origin, Vector<DeprecatedString> const& protocols, Vector<DeprecatedString> const& extensions, HashMap<DeprecatedString, DeprecatedString> const& request_headers)
{
IPC::Dictionary header_dictionary;
for (auto& it : request_headers)
@ -41,14 +41,14 @@ void WebSocketClient::send(Badge<WebSocket>, WebSocket& connection, ByteBuffer d
async_send(connection.id(), is_text, move(data));
}
void WebSocketClient::close(Badge<WebSocket>, WebSocket& connection, u16 code, String message)
void WebSocketClient::close(Badge<WebSocket>, WebSocket& connection, u16 code, DeprecatedString message)
{
if (!m_connections.contains(connection.id()))
return;
async_close(connection.id(), code, move(message));
}
bool WebSocketClient::set_certificate(Badge<WebSocket>, WebSocket& connection, String certificate, String key)
bool WebSocketClient::set_certificate(Badge<WebSocket>, WebSocket& connection, DeprecatedString certificate, DeprecatedString key)
{
if (!m_connections.contains(connection.id()))
return false;
@ -76,7 +76,7 @@ void WebSocketClient::errored(i32 connection_id, i32 message)
maybe_connection.value()->did_error({}, message);
}
void WebSocketClient::closed(i32 connection_id, u16 code, String const& reason, bool clean)
void WebSocketClient::closed(i32 connection_id, u16 code, DeprecatedString const& reason, bool clean)
{
auto maybe_connection = m_connections.get(connection_id);
if (maybe_connection.has_value())