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

Unified Diff: Source/core/fetch/ResourceLoaderOptions.h

Issue 137983010: (Re)organize handling of CORS access control during resource loading. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: HTMLImportLoader no longer needs a ResourceFetcher Created 6 years, 11 months 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/core/fetch/ResourceLoaderHost.h ('k') | Source/core/html/HTMLImportChild.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/ResourceLoaderOptions.h
diff --git a/Source/core/fetch/ResourceLoaderOptions.h b/Source/core/fetch/ResourceLoaderOptions.h
index ff4572782c6c5404db5bcfaa870f03ee8735f289..afc2aa3cbfa9b3fff22fe007ff9fe4f5bcfd1ca2 100644
--- a/Source/core/fetch/ResourceLoaderOptions.h
+++ b/Source/core/fetch/ResourceLoaderOptions.h
@@ -92,6 +92,13 @@ enum SynchronousPolicy {
RequestAsynchronously
};
+// A resource fetch can be marked as being CORS enabled. The loader
+// must perform an access check upon seeing the response.
+enum CORSEnabled {
+ NotCORSEnabled,
+ IsCORSEnabled
+};
+
struct ResourceLoaderOptions {
ResourceLoaderOptions()
: sniffContent(DoNotSniffContent)
@@ -104,6 +111,7 @@ struct ResourceLoaderOptions {
, requestInitiatorContext(DocumentContext)
, mixedContentBlockingTreatment(TreatAsDefaultForType)
, synchronousPolicy(RequestAsynchronously)
+ , corsEnabled(NotCORSEnabled)
{
}
@@ -126,6 +134,7 @@ struct ResourceLoaderOptions {
, requestInitiatorContext(requestInitiatorContext)
, mixedContentBlockingTreatment(TreatAsDefaultForType)
, synchronousPolicy(RequestAsynchronously)
+ , corsEnabled(NotCORSEnabled)
{
}
@@ -140,6 +149,7 @@ struct ResourceLoaderOptions {
RequestInitiatorContext requestInitiatorContext;
MixedContentBlockingTreatment mixedContentBlockingTreatment;
SynchronousPolicy synchronousPolicy;
+ CORSEnabled corsEnabled; // If the resource is loaded out-of-origin, whether or not to use CORS.
RefPtr<SecurityOrigin> securityOrigin;
};
« no previous file with comments | « Source/core/fetch/ResourceLoaderHost.h ('k') | Source/core/html/HTMLImportChild.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698