Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(294)

Unified Diff: public/web/WebURLLoaderOptions.h

Issue 68173029: Support full range of PreflightPolicy over WebURLLoaderOptions (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: compile-time asserts for ensuring that PreflightPolicy enums remain sync Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/AssociatedURLLoader.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/web/WebURLLoaderOptions.h
diff --git a/public/web/WebURLLoaderOptions.h b/public/web/WebURLLoaderOptions.h
index 045595d74c11a830d98edb6cc5367f3a116e0cea..a0c135df17ef4f2d56ddfe4da096bd64239256a7 100644
--- a/public/web/WebURLLoaderOptions.h
+++ b/public/web/WebURLLoaderOptions.h
@@ -41,20 +41,26 @@ struct WebURLLoaderOptions {
CrossOriginRequestPolicyAllow
};
+ enum PreflightPolicy {
+ ConsiderPreflight,
+ ForcePreflight,
+ PreventPreflight
+ };
+
WebURLLoaderOptions()
: untrustedHTTP(false)
, sniffContent(false)
, allowCredentials(false)
- , forcePreflight(false)
, exposeAllResponseHeaders(false)
+ , preflightPolicy(ConsiderPreflight)
, crossOriginRequestPolicy(CrossOriginRequestPolicyDeny)
{ }
bool untrustedHTTP; // Whether to validate the method and headers as if this was an XMLHttpRequest.
bool sniffContent; // Whether to sniff content.
bool allowCredentials; // Whether to send HTTP credentials and cookies with the request.
- bool forcePreflight; // If policy is to use access control, whether to force a preflight for GET, HEAD, and POST requests.
bool exposeAllResponseHeaders; // If policy is to use access control, whether to expose non-whitelisted response headers to the client.
+ PreflightPolicy preflightPolicy;
CrossOriginRequestPolicy crossOriginRequestPolicy;
};
« no previous file with comments | « Source/web/AssociatedURLLoader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698