diff options
Diffstat (limited to 'chromium/third_party/blink/renderer/platform/loader/cors/cors.h')
-rw-r--r-- | chromium/third_party/blink/renderer/platform/loader/cors/cors.h | 64 |
1 files changed, 1 insertions, 63 deletions
diff --git a/chromium/third_party/blink/renderer/platform/loader/cors/cors.h b/chromium/third_party/blink/renderer/platform/loader/cors/cors.h index e76d68adaa2..f3886e799e6 100644 --- a/chromium/third_party/blink/renderer/platform/loader/cors/cors.h +++ b/chromium/third_party/blink/renderer/platform/loader/cors/cors.h @@ -31,78 +31,17 @@ enum class CorsFlag : uint8_t { namespace cors { // Thin wrapper functions below are for calling ::network::cors functions from -// Blink core. Once Out-of-renderer CORS is enabled, following functions will -// be removed. -PLATFORM_EXPORT base::Optional<network::CorsErrorStatus> CheckAccess( - const KURL&, - const HTTPHeaderMap&, - network::mojom::CredentialsMode, - const SecurityOrigin&); - -PLATFORM_EXPORT base::Optional<network::CorsErrorStatus> CheckPreflightAccess( - const KURL&, - const int response_status_code, - const HTTPHeaderMap&, - network::mojom::CredentialsMode, - const SecurityOrigin&); - -PLATFORM_EXPORT base::Optional<network::CorsErrorStatus> CheckRedirectLocation( - const KURL&, - network::mojom::RequestMode, - const SecurityOrigin*, - CorsFlag); - -PLATFORM_EXPORT base::Optional<network::CorsErrorStatus> CheckExternalPreflight( - const HTTPHeaderMap&); - +// Blink core. PLATFORM_EXPORT bool IsCorsEnabledRequestMode(network::mojom::RequestMode); - -PLATFORM_EXPORT base::Optional<network::CorsErrorStatus> -EnsurePreflightResultAndCacheOnSuccess( - const HTTPHeaderMap& response_header_map, - const String& origin, - const KURL& request_url, - const String& request_method, - const HTTPHeaderMap& request_header_map, - network::mojom::CredentialsMode request_credentials_mode); - -PLATFORM_EXPORT bool CheckIfRequestCanSkipPreflight( - const String& origin, - const KURL&, - network::mojom::CredentialsMode, - const String& method, - const HTTPHeaderMap& request_header_map); - -// Returns the response tainting value -// (https://fetch.spec.whatwg.org/#concept-request-response-tainting) for a -// request and the CORS flag, as specified in -// https://fetch.spec.whatwg.org/#main-fetch. -PLATFORM_EXPORT network::mojom::FetchResponseType CalculateResponseTainting( - const KURL& url, - network::mojom::RequestMode request_mode, - const SecurityOrigin* origin, - const SecurityOrigin* isolated_world_origin, - CorsFlag cors_flag); - -PLATFORM_EXPORT bool CalculateCredentialsFlag( - network::mojom::CredentialsMode credentials_mode, - network::mojom::FetchResponseType response_tainting); - -// Thin wrapper functions that will not be removed even after out-of-renderer -// CORS is enabled. PLATFORM_EXPORT bool IsCorsSafelistedMethod(const String& method); PLATFORM_EXPORT bool IsCorsSafelistedContentType(const String&); PLATFORM_EXPORT bool IsNoCorsSafelistedHeader(const String& name, const String& value); PLATFORM_EXPORT bool IsPrivilegedNoCorsHeaderName(const String& name); PLATFORM_EXPORT bool IsNoCorsSafelistedHeaderName(const String& name); -PLATFORM_EXPORT Vector<String> CorsUnsafeRequestHeaderNames( - const HTTPHeaderMap& headers); PLATFORM_EXPORT Vector<String> PrivilegedNoCorsHeaderNames(); PLATFORM_EXPORT bool IsForbiddenHeaderName(const String& name); PLATFORM_EXPORT bool ContainsOnlyCorsSafelistedHeaders(const HTTPHeaderMap&); -PLATFORM_EXPORT bool ContainsOnlyCorsSafelistedOrForbiddenHeaders( - const HTTPHeaderMap&); PLATFORM_EXPORT bool IsOkStatus(int status); @@ -114,7 +53,6 @@ PLATFORM_EXPORT bool IsOkStatus(int status); // |kNavigate|. // This should be identical to CalculateCorsFlag defined in // //services/network/cors/cors_url_loader.cc. -// This function will be removed when out-of-renderer CORS is enabled. PLATFORM_EXPORT bool CalculateCorsFlag( const KURL& url, const SecurityOrigin* initiator_origin, |