mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-06 09:36:08 +00:00
LibWeb/CSP: Add [[nodiscard]] to result enums
This makes it so we don't have to remember to specify [[nodiscard]] on functions that return them.
This commit is contained in:
parent
d7deb6d58f
commit
002e993f68
Notes:
github-actions[bot]
2025-07-06 12:17:27 +00:00
Author: https://github.com/Lubrsi
Commit: 002e993f68
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5308
Reviewed-by: https://github.com/shannonbooth
8 changed files with 31 additions and 31 deletions
|
@ -14,26 +14,26 @@
|
|||
|
||||
namespace Web::ContentSecurityPolicy::Directives {
|
||||
|
||||
enum class ShouldExecute {
|
||||
enum class [[nodiscard]] ShouldExecute {
|
||||
No,
|
||||
Yes,
|
||||
};
|
||||
|
||||
enum class MatchResult {
|
||||
enum class [[nodiscard]] MatchResult {
|
||||
DoesNotMatch,
|
||||
Matches,
|
||||
};
|
||||
|
||||
[[nodiscard]] Optional<FlyString> get_the_effective_directive_for_request(GC::Ref<Fetch::Infrastructure::Request const> request);
|
||||
[[nodiscard]] Vector<StringView> get_fetch_directive_fallback_list(Optional<FlyString> directive_name);
|
||||
[[nodiscard]] ShouldExecute should_fetch_directive_execute(Optional<FlyString> effective_directive_name, FlyString const& directive_name, GC::Ref<Policy const> policy);
|
||||
ShouldExecute should_fetch_directive_execute(Optional<FlyString> effective_directive_name, FlyString const& directive_name, GC::Ref<Policy const> policy);
|
||||
|
||||
[[nodiscard]] FlyString get_the_effective_directive_for_inline_checks(Directive::InlineType type);
|
||||
|
||||
[[nodiscard]] MatchResult does_url_match_expression_in_origin_with_redirect_count(URL::URL const& url, String const& expression, URL::Origin const& origin, u8 redirect_count);
|
||||
[[nodiscard]] MatchResult does_url_match_source_list_in_origin_with_redirect_count(URL::URL const& url, Vector<String> const& source_list, URL::Origin const& origin, u8 redirect_count);
|
||||
MatchResult does_url_match_expression_in_origin_with_redirect_count(URL::URL const& url, String const& expression, URL::Origin const& origin, u8 redirect_count);
|
||||
MatchResult does_url_match_source_list_in_origin_with_redirect_count(URL::URL const& url, Vector<String> const& source_list, URL::Origin const& origin, u8 redirect_count);
|
||||
|
||||
[[nodiscard]] MatchResult does_request_match_source_list(GC::Ref<Fetch::Infrastructure::Request const> request, Vector<String> const& source_list, GC::Ref<Policy const> policy);
|
||||
[[nodiscard]] MatchResult does_response_match_source_list(GC::Ref<Fetch::Infrastructure::Response const> response, GC::Ref<Fetch::Infrastructure::Request const> request, Vector<String> const& source_list, GC::Ref<Policy const> policy);
|
||||
MatchResult does_request_match_source_list(GC::Ref<Fetch::Infrastructure::Request const> request, Vector<String> const& source_list, GC::Ref<Policy const> policy);
|
||||
MatchResult does_response_match_source_list(GC::Ref<Fetch::Infrastructure::Response const> response, GC::Ref<Fetch::Infrastructure::Request const> request, Vector<String> const& source_list, GC::Ref<Policy const> policy);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue