| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 enum ContentSniffingPolicy { | 39 enum ContentSniffingPolicy { |
| 40 SniffContent, | 40 SniffContent, |
| 41 DoNotSniffContent | 41 DoNotSniffContent |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 enum DataBufferingPolicy { | 44 enum DataBufferingPolicy { |
| 45 BufferData, | 45 BufferData, |
| 46 DoNotBufferData | 46 DoNotBufferData |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 enum ClientCrossOriginCredentialPolicy { | |
| 50 AskClientForCrossOriginCredentials, | |
| 51 DoNotAskClientForCrossOriginCredentials | |
| 52 }; | |
| 53 | |
| 54 enum SecurityCheckPolicy { | |
| 55 SkipSecurityCheck, | |
| 56 DoSecurityCheck | |
| 57 }; | |
| 58 | |
| 59 enum ContentSecurityPolicyCheck { | 49 enum ContentSecurityPolicyCheck { |
| 60 CheckContentSecurityPolicy, | 50 CheckContentSecurityPolicy, |
| 61 DoNotCheckContentSecurityPolicy | 51 DoNotCheckContentSecurityPolicy |
| 62 }; | 52 }; |
| 63 | 53 |
| 64 enum RequestInitiatorContext { | 54 enum RequestInitiatorContext { |
| 65 DocumentContext, | 55 DocumentContext, |
| 66 WorkerContext, | 56 WorkerContext, |
| 67 }; | 57 }; |
| 68 | 58 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 98 NotCORSEnabled, | 88 NotCORSEnabled, |
| 99 IsCORSEnabled | 89 IsCORSEnabled |
| 100 }; | 90 }; |
| 101 | 91 |
| 102 struct ResourceLoaderOptions { | 92 struct ResourceLoaderOptions { |
| 103 ResourceLoaderOptions() | 93 ResourceLoaderOptions() |
| 104 : sniffContent(DoNotSniffContent) | 94 : sniffContent(DoNotSniffContent) |
| 105 , dataBufferingPolicy(BufferData) | 95 , dataBufferingPolicy(BufferData) |
| 106 , allowCredentials(DoNotAllowStoredCredentials) | 96 , allowCredentials(DoNotAllowStoredCredentials) |
| 107 , credentialsRequested(ClientDidNotRequestCredentials) | 97 , credentialsRequested(ClientDidNotRequestCredentials) |
| 108 , crossOriginCredentialPolicy(DoNotAskClientForCrossOriginCredentials) | |
| 109 , securityCheck(DoSecurityCheck) | |
| 110 , contentSecurityPolicyOption(CheckContentSecurityPolicy) | 98 , contentSecurityPolicyOption(CheckContentSecurityPolicy) |
| 111 , requestInitiatorContext(DocumentContext) | 99 , requestInitiatorContext(DocumentContext) |
| 112 , mixedContentBlockingTreatment(TreatAsDefaultForType) | 100 , mixedContentBlockingTreatment(TreatAsDefaultForType) |
| 113 , synchronousPolicy(RequestAsynchronously) | 101 , synchronousPolicy(RequestAsynchronously) |
| 114 , corsEnabled(NotCORSEnabled) | 102 , corsEnabled(NotCORSEnabled) |
| 115 { | 103 { |
| 116 } | 104 } |
| 117 | 105 |
| 118 ResourceLoaderOptions( | 106 ResourceLoaderOptions( |
| 119 ContentSniffingPolicy sniffContent, | 107 ContentSniffingPolicy sniffContent, |
| 120 DataBufferingPolicy dataBufferingPolicy, | 108 DataBufferingPolicy dataBufferingPolicy, |
| 121 StoredCredentials allowCredentials, | 109 StoredCredentials allowCredentials, |
| 122 CredentialRequest credentialsRequested, | 110 CredentialRequest credentialsRequested, |
| 123 ClientCrossOriginCredentialPolicy crossOriginCredentialPolicy, | |
| 124 SecurityCheckPolicy securityCheck, | |
| 125 ContentSecurityPolicyCheck contentSecurityPolicyOption, | 111 ContentSecurityPolicyCheck contentSecurityPolicyOption, |
| 126 RequestInitiatorContext requestInitiatorContext) | 112 RequestInitiatorContext requestInitiatorContext) |
| 127 : sniffContent(sniffContent) | 113 : sniffContent(sniffContent) |
| 128 , dataBufferingPolicy(dataBufferingPolicy) | 114 , dataBufferingPolicy(dataBufferingPolicy) |
| 129 , allowCredentials(allowCredentials) | 115 , allowCredentials(allowCredentials) |
| 130 , credentialsRequested(credentialsRequested) | 116 , credentialsRequested(credentialsRequested) |
| 131 , crossOriginCredentialPolicy(crossOriginCredentialPolicy) | |
| 132 , securityCheck(securityCheck) | |
| 133 , contentSecurityPolicyOption(contentSecurityPolicyOption) | 117 , contentSecurityPolicyOption(contentSecurityPolicyOption) |
| 134 , requestInitiatorContext(requestInitiatorContext) | 118 , requestInitiatorContext(requestInitiatorContext) |
| 135 , mixedContentBlockingTreatment(TreatAsDefaultForType) | 119 , mixedContentBlockingTreatment(TreatAsDefaultForType) |
| 136 , synchronousPolicy(RequestAsynchronously) | 120 , synchronousPolicy(RequestAsynchronously) |
| 137 , corsEnabled(NotCORSEnabled) | 121 , corsEnabled(NotCORSEnabled) |
| 138 { | 122 { |
| 139 } | 123 } |
| 140 | 124 |
| 141 ContentSniffingPolicy sniffContent; | 125 ContentSniffingPolicy sniffContent; |
| 142 DataBufferingPolicy dataBufferingPolicy; | 126 DataBufferingPolicy dataBufferingPolicy; |
| 143 StoredCredentials allowCredentials; // Whether HTTP credentials and cookies
are sent with the request. | 127 StoredCredentials allowCredentials; // Whether HTTP credentials and cookies
are sent with the request. |
| 144 CredentialRequest credentialsRequested; // Whether the client (e.g. XHR) wan
ted credentials in the first place. | 128 CredentialRequest credentialsRequested; // Whether the client (e.g. XHR) wan
ted credentials in the first place. |
| 145 ClientCrossOriginCredentialPolicy crossOriginCredentialPolicy; // Whether we
will ask the client for credentials (if we allow credentials at all). | |
| 146 SecurityCheckPolicy securityCheck; | |
| 147 ContentSecurityPolicyCheck contentSecurityPolicyOption; | 129 ContentSecurityPolicyCheck contentSecurityPolicyOption; |
| 148 FetchInitiatorInfo initiatorInfo; | 130 FetchInitiatorInfo initiatorInfo; |
| 149 RequestInitiatorContext requestInitiatorContext; | 131 RequestInitiatorContext requestInitiatorContext; |
| 150 MixedContentBlockingTreatment mixedContentBlockingTreatment; | 132 MixedContentBlockingTreatment mixedContentBlockingTreatment; |
| 151 SynchronousPolicy synchronousPolicy; | 133 SynchronousPolicy synchronousPolicy; |
| 152 CORSEnabled corsEnabled; // If the resource is loaded out-of-origin, whether
or not to use CORS. | 134 CORSEnabled corsEnabled; // If the resource is loaded out-of-origin, whether
or not to use CORS. |
| 153 RefPtr<SecurityOrigin> securityOrigin; | 135 RefPtr<SecurityOrigin> securityOrigin; |
| 154 }; | 136 }; |
| 155 | 137 |
| 156 } // namespace WebCore | 138 } // namespace WebCore |
| 157 | 139 |
| 158 #endif // ResourceLoaderOptions_h | 140 #endif // ResourceLoaderOptions_h |
| OLD | NEW |