diff options
Diffstat (limited to 'chromium/third_party/blink/renderer/platform/loader/fetch/resource_loader_options.h')
-rw-r--r-- | chromium/third_party/blink/renderer/platform/loader/fetch/resource_loader_options.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/chromium/third_party/blink/renderer/platform/loader/fetch/resource_loader_options.h b/chromium/third_party/blink/renderer/platform/loader/fetch/resource_loader_options.h index b233ca5deed..8cc09706c37 100644 --- a/chromium/third_party/blink/renderer/platform/loader/fetch/resource_loader_options.h +++ b/chromium/third_party/blink/renderer/platform/loader/fetch/resource_loader_options.h @@ -32,7 +32,9 @@ #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_LOADER_FETCH_RESOURCE_LOADER_OPTIONS_H_ #include "base/memory/scoped_refptr.h" +#include "base/util/type_safety/strong_alias.h" #include "mojo/public/cpp/bindings/pending_remote.h" +#include "services/network/public/mojom/content_security_policy.mojom-blink-forward.h" #include "services/network/public/mojom/url_loader_factory.mojom-blink-forward.h" #include "third_party/blink/renderer/platform/loader/fetch/fetch_initiator_info.h" #include "third_party/blink/renderer/platform/loader/fetch/integrity_metadata.h" @@ -44,11 +46,6 @@ namespace blink { enum DataBufferingPolicy : uint8_t { kBufferData, kDoNotBufferData }; -enum ContentSecurityPolicyDisposition : uint8_t { - kCheckContentSecurityPolicy, - kDoNotCheckContentSecurityPolicy -}; - enum RequestInitiatorContext : uint8_t { kDocumentContext, kWorkerContext, @@ -75,6 +72,12 @@ enum CacheAwareLoadingEnabled : uint8_t { kIsCacheAwareLoadingEnabled }; +// https://github.com/WICG/cross-origin-embedder-policy/pull/13 +// When true, a response is blocked unless it has +// cross-origin-embedder-policy: require-corp. +using RejectCoepUnsafeNone = + util::StrongAlias<class RejectCoepUnsafeNoneTag, bool>; + // This class is thread-bound. Do not copy/pass an instance across threads. struct PLATFORM_EXPORT ResourceLoaderOptions { USING_FAST_MALLOC(ResourceLoaderOptions); @@ -93,7 +96,7 @@ struct PLATFORM_EXPORT ResourceLoaderOptions { DataBufferingPolicy data_buffering_policy; - ContentSecurityPolicyDisposition content_security_policy_option; + network::mojom::CSPDisposition content_security_policy_option; RequestInitiatorContext request_initiator_context; SynchronousPolicy synchronous_policy; @@ -105,6 +108,9 @@ struct PLATFORM_EXPORT ResourceLoaderOptions { // Corresponds to the CORS flag in the Fetch spec. bool cors_flag; + // TODO(crbug.com/1064920): Remove this once PlzDedicatedWorker ships. + RejectCoepUnsafeNone reject_coep_unsafe_none = RejectCoepUnsafeNone(false); + String content_security_policy_nonce; IntegrityMetadataSet integrity_metadata; ParserDisposition parser_disposition; |