X-Git-Url: http://git.webkit.org/?p=WebKit-https.git;a=blobdiff_plain;f=Source%2FWebCore%2Floader%2FResourceLoaderOptions.h;h=8e1b74db55dee8745d949381ccdc15e4e28823a9;hp=a290ad7cd37abbe8d3d3448af4ee87a0ecd54601;hb=10e10b53ff54da3b758adf2a9f556484c68a1967;hpb=ca97b289ad29c50a0be9bf717e851052018a9cc9 diff --git a/Source/WebCore/loader/ResourceLoaderOptions.h b/Source/WebCore/loader/ResourceLoaderOptions.h index a290ad7..8e1b74d 100644 --- a/Source/WebCore/loader/ResourceLoaderOptions.h +++ b/Source/WebCore/loader/ResourceLoaderOptions.h @@ -31,7 +31,7 @@ #ifndef ResourceLoaderOptions_h #define ResourceLoaderOptions_h -#include "ResourceHandle.h" +#include "ResourceHandleTypes.h" namespace WebCore { @@ -50,33 +50,46 @@ enum DataBufferingPolicy { DoNotBufferData }; -enum ClientCrossOriginCredentialPolicy { - AskClientForCrossOriginCredentials, - DoNotAskClientForCrossOriginCredentials -}; - 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), allowCredentials(DoNotAllowStoredCredentials), crossOriginCredentialPolicy(DoNotAskClientForCrossOriginCredentials), securityCheck(DoSecurityCheck) { } - ResourceLoaderOptions(SendCallbackPolicy sendLoadCallbacks, ContentSniffingPolicy sniffContent, DataBufferingPolicy shouldBufferData, StoredCredentials allowCredentials, ClientCrossOriginCredentialPolicy crossOriginCredentialPolicy, SecurityCheckPolicy securityCheck) + 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) - , shouldBufferData(shouldBufferData) + , dataBufferingPolicy(dataBufferingPolicy) , allowCredentials(allowCredentials) - , crossOriginCredentialPolicy(crossOriginCredentialPolicy) + , 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. - ClientCrossOriginCredentialPolicy crossOriginCredentialPolicy; // Whether we will ask the client for credentials (if we allow credentials at all). + ClientCredentialPolicy clientCredentialPolicy; // When we should ask the client for credentials (if we allow credentials at all). SecurityCheckPolicy securityCheck; + RequestOriginPolicy requestOriginPolicy; }; } // namespace WebCore