mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:47:34 +00:00
AK+Everywhere: Replace "protocol" with "scheme" url helpers
URL had properly named replacements for protocol(), set_protocol() and create_with_file_protocol() already. This patch removes these function and updates all call sites to use the functions named according to the specification. See https://url.spec.whatwg.org/#concept-url-scheme
This commit is contained in:
parent
454bf1fde0
commit
4230dbbb21
61 changed files with 113 additions and 116 deletions
|
@ -77,7 +77,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
// Connect to LaunchServer immediately and let it know that we won't ask for anything other than opening
|
||||
// the user's downloads directory.
|
||||
// FIXME: This should go away with a standalone download manager at some point.
|
||||
TRY(Desktop::Launcher::add_allowed_url(URL::create_with_file_protocol(Core::StandardPaths::downloads_directory())));
|
||||
TRY(Desktop::Launcher::add_allowed_url(URL::create_with_file_scheme(Core::StandardPaths::downloads_directory())));
|
||||
TRY(Desktop::Launcher::seal_allowlist());
|
||||
|
||||
TRY(Core::System::unveil("/home", "rwc"));
|
||||
|
@ -120,7 +120,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
auto url_from_argument_string = [](String const& string) -> URL {
|
||||
if (Core::File::exists(string)) {
|
||||
return URL::create_with_file_protocol(Core::File::real_path_for(string));
|
||||
return URL::create_with_file_scheme(Core::File::real_path_for(string));
|
||||
}
|
||||
return Browser::url_from_user_input(string);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue