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
Notes: sideshowbarker 2024-07-18 04:38:32 +09:00
2006 changed files with 11635 additions and 11636 deletions

View file

@ -12,14 +12,14 @@ namespace Web::HTML {
class ModuleLocationTuple {
public:
ModuleLocationTuple(AK::URL url, String type)
ModuleLocationTuple(AK::URL url, DeprecatedString type)
: m_url(move(url))
, m_type(move(type))
{
}
AK::URL const& url() const { return m_url; };
String const& type() const { return m_type; }
DeprecatedString const& type() const { return m_type; }
bool operator==(ModuleLocationTuple const& other) const
{
@ -28,7 +28,7 @@ public:
private:
AK::URL m_url;
String m_type;
DeprecatedString m_type;
};
// https://html.spec.whatwg.org/multipage/webappapis.html#module-map
@ -50,16 +50,16 @@ public:
JavaScriptModuleScript* module_script;
};
bool is_fetching(AK::URL const& url, String const& type) const;
bool is_failed(AK::URL const& url, String const& type) const;
bool is_fetching(AK::URL const& url, DeprecatedString const& type) const;
bool is_failed(AK::URL const& url, DeprecatedString const& type) const;
bool is(AK::URL const& url, String const& type, EntryType) const;
bool is(AK::URL const& url, DeprecatedString const& type, EntryType) const;
Optional<Entry> get(AK::URL const& url, String const& type) const;
Optional<Entry> get(AK::URL const& url, DeprecatedString const& type) const;
AK::HashSetResult set(AK::URL const& url, String const& type, Entry);
AK::HashSetResult set(AK::URL const& url, DeprecatedString const& type, Entry);
void wait_for_change(AK::URL const& url, String const& type, Function<void(Entry)> callback);
void wait_for_change(AK::URL const& url, DeprecatedString const& type, Function<void(Entry)> callback);
private:
HashMap<ModuleLocationTuple, Entry> m_values;