summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibDesktop/Launcher.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-11-24 00:23:00 +0100
committerAndreas Kling <kling@serenityos.org>2021-11-24 00:25:23 +0100
commitb6f49924bec74d93d52dae7b311938e37c68947e (patch)
tree6b55f53a1528fb57a442e6f97742ac4e691cb2e5 /Userland/Libraries/LibDesktop/Launcher.h
parent4a64bb80eaec84de46a12dac74c27cbf1a0b1bd8 (diff)
downloadserenity-b6f49924bec74d93d52dae7b311938e37c68947e.zip
LibDesktop: Make allowlist APIs return ErrorOr<void>
This makes it very smooth to use TRY() when setting up these lists, as you can see in the rest of this commit. :^)
Diffstat (limited to 'Userland/Libraries/LibDesktop/Launcher.h')
-rw-r--r--Userland/Libraries/LibDesktop/Launcher.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibDesktop/Launcher.h b/Userland/Libraries/LibDesktop/Launcher.h
index 4612eb6afc..a74a6505a6 100644
--- a/Userland/Libraries/LibDesktop/Launcher.h
+++ b/Userland/Libraries/LibDesktop/Launcher.h
@@ -31,10 +31,10 @@ public:
static NonnullRefPtr<Details> from_details_str(const String&);
};
- [[nodiscard]] static bool add_allowed_url(const URL&);
- [[nodiscard]] static bool add_allowed_handler_with_any_url(const String& handler);
- [[nodiscard]] static bool add_allowed_handler_with_only_specific_urls(const String& handler, const Vector<URL>&);
- [[nodiscard]] static bool seal_allowlist();
+ static ErrorOr<void> add_allowed_url(URL const&);
+ static ErrorOr<void> add_allowed_handler_with_any_url(String const& handler);
+ static ErrorOr<void> add_allowed_handler_with_only_specific_urls(String const& handler, Vector<URL> const&);
+ static ErrorOr<void> seal_allowlist();
static bool open(const URL&, const String& handler_name = {});
static bool open(const URL&, const Details& details);
static Vector<String> get_handlers_for_url(const URL&);