X-Git-Url: http://git.webkit.org/?p=WebKit-https.git;a=blobdiff_plain;f=Source%2FWebCore%2Floader%2FResourceLoaderOptions.h;h=8e1b74db55dee8745d949381ccdc15e4e28823a9;hp=a92fb22aa0e7032d9b37d8173dbaa0238a74bb88;hb=10e10b53ff54da3b758adf2a9f556484c68a1967;hpb=db47ec16e8d3e79ef67050d9e5bc5f8f58a018e8 diff --git a/Source/WebCore/loader/ResourceLoaderOptions.h b/Source/WebCore/loader/ResourceLoaderOptions.h index a92fb22..8e1b74d 100644 --- a/Source/WebCore/loader/ResourceLoaderOptions.h +++ b/Source/WebCore/loader/ResourceLoaderOptions.h @@ -31,6 +31,8 @@ #ifndef ResourceLoaderOptions_h #define ResourceLoaderOptions_h +#include "ResourceHandleTypes.h" + namespace WebCore { enum SendCallbackPolicy { @@ -48,12 +50,46 @@ enum DataBufferingPolicy { DoNotBufferData }; +enum SecurityCheckPolicy { + SkipSecurityCheck, + DoSecurityCheck +}; + +enum RequestOriginPolicy { + UseDefaultOriginRestrictionsForType, + RestrictToSameOrigin, + PotentiallyCrossOriginEnabled // Indicates "potentially CORS-enabled fetch" in HTML standard. +}; + struct ResourceLoaderOptions { - ResourceLoaderOptions() : sendLoadCallbacks(DoNotSendCallbacks), sniffContent(DoNotSniffContent), shouldBufferData(BufferData) { } - ResourceLoaderOptions(SendCallbackPolicy sendLoadCallbacksArg, ContentSniffingPolicy sniffContentArg, DataBufferingPolicy shouldBufferDataArg) : sendLoadCallbacks(sendLoadCallbacksArg), sniffContent(sniffContentArg), shouldBufferData(shouldBufferDataArg) { } + ResourceLoaderOptions() + : sendLoadCallbacks(DoNotSendCallbacks) + , sniffContent(DoNotSniffContent) + , dataBufferingPolicy(BufferData) + , allowCredentials(DoNotAllowStoredCredentials) + , clientCredentialPolicy(DoNotAskClientForAnyCredentials) + , securityCheck(DoSecurityCheck) + , requestOriginPolicy(UseDefaultOriginRestrictionsForType) + { + } + + ResourceLoaderOptions(SendCallbackPolicy sendLoadCallbacks, ContentSniffingPolicy sniffContent, DataBufferingPolicy dataBufferingPolicy, StoredCredentials allowCredentials, ClientCredentialPolicy credentialPolicy, SecurityCheckPolicy securityCheck, RequestOriginPolicy requestOriginPolicy) + : sendLoadCallbacks(sendLoadCallbacks) + , sniffContent(sniffContent) + , dataBufferingPolicy(dataBufferingPolicy) + , allowCredentials(allowCredentials) + , clientCredentialPolicy(credentialPolicy) + , securityCheck(securityCheck) + , requestOriginPolicy(requestOriginPolicy) + { + } SendCallbackPolicy sendLoadCallbacks; ContentSniffingPolicy sniffContent; - DataBufferingPolicy shouldBufferData; + DataBufferingPolicy dataBufferingPolicy; + StoredCredentials allowCredentials; // Whether HTTP credentials and cookies are sent with the request. + ClientCredentialPolicy clientCredentialPolicy; // When we should ask the client for credentials (if we allow credentials at all). + SecurityCheckPolicy securityCheck; + RequestOriginPolicy requestOriginPolicy; }; } // namespace WebCore