mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:57:43 +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:
parent
f74251606d
commit
6e19ab2bbc
2006 changed files with 11635 additions and 11636 deletions
|
@ -57,7 +57,7 @@ void Resource::for_each_client(Function<void(ResourceClient&)> callback)
|
|||
}
|
||||
}
|
||||
|
||||
static Optional<String> encoding_from_content_type(String const& content_type)
|
||||
static Optional<DeprecatedString> encoding_from_content_type(DeprecatedString const& content_type)
|
||||
{
|
||||
auto offset = content_type.find("charset="sv);
|
||||
if (offset.has_value()) {
|
||||
|
@ -72,7 +72,7 @@ static Optional<String> encoding_from_content_type(String const& content_type)
|
|||
return {};
|
||||
}
|
||||
|
||||
static String mime_type_from_content_type(String const& content_type)
|
||||
static DeprecatedString mime_type_from_content_type(DeprecatedString const& content_type)
|
||||
{
|
||||
auto offset = content_type.find(';');
|
||||
if (offset.has_value())
|
||||
|
@ -81,12 +81,12 @@ static String mime_type_from_content_type(String const& content_type)
|
|||
return content_type;
|
||||
}
|
||||
|
||||
static bool is_valid_encoding(String const& encoding)
|
||||
static bool is_valid_encoding(DeprecatedString const& encoding)
|
||||
{
|
||||
return TextCodec::decoder_for(encoding);
|
||||
}
|
||||
|
||||
void Resource::did_load(Badge<ResourceLoader>, ReadonlyBytes data, HashMap<String, String, CaseInsensitiveStringTraits> const& headers, Optional<u32> status_code)
|
||||
void Resource::did_load(Badge<ResourceLoader>, ReadonlyBytes data, HashMap<DeprecatedString, DeprecatedString, CaseInsensitiveStringTraits> const& headers, Optional<u32> status_code)
|
||||
{
|
||||
VERIFY(!m_loaded);
|
||||
// FIXME: Handle OOM failure.
|
||||
|
@ -131,7 +131,7 @@ void Resource::did_load(Badge<ResourceLoader>, ReadonlyBytes data, HashMap<Strin
|
|||
});
|
||||
}
|
||||
|
||||
void Resource::did_fail(Badge<ResourceLoader>, String const& error, Optional<u32> status_code)
|
||||
void Resource::did_fail(Badge<ResourceLoader>, DeprecatedString const& error, Optional<u32> status_code)
|
||||
{
|
||||
m_error = error;
|
||||
m_status_code = move(status_code);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue