mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 17:44:56 +09:00

A violation provides several details about an enforcement failing, such as the URL of the document, the directive that returned "Blocked", etc.
33 lines
730 B
C++
33 lines
730 B
C++
/*
|
|
* Copyright (c) 2025, Luke Wilde <luke@ladybird.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LibIPC/Forward.h>
|
|
#include <LibWeb/ContentSecurityPolicy/Directives/SerializedDirective.h>
|
|
#include <LibWeb/ContentSecurityPolicy/Policy.h>
|
|
|
|
namespace Web::ContentSecurityPolicy {
|
|
|
|
struct SerializedPolicy {
|
|
Vector<Directives::SerializedDirective> directives;
|
|
Policy::Disposition disposition;
|
|
Policy::Source source;
|
|
URL::Origin self_origin;
|
|
String pre_parsed_policy_string;
|
|
};
|
|
|
|
}
|
|
|
|
namespace IPC {
|
|
|
|
template<>
|
|
ErrorOr<void> encode(Encoder&, Web::ContentSecurityPolicy::SerializedPolicy const&);
|
|
|
|
template<>
|
|
ErrorOr<Web::ContentSecurityPolicy::SerializedPolicy> decode(Decoder&);
|
|
|
|
}
|