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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 enum SecurityCheckPolicy { | 58 enum SecurityCheckPolicy { |
59 SkipSecurityCheck, | 59 SkipSecurityCheck, |
60 DoSecurityCheck | 60 DoSecurityCheck |
61 }; | 61 }; |
62 | 62 |
63 enum ContentSecurityPolicyCheck { | 63 enum ContentSecurityPolicyCheck { |
64 CheckContentSecurityPolicy, | 64 CheckContentSecurityPolicy, |
65 DoNotCheckContentSecurityPolicy | 65 DoNotCheckContentSecurityPolicy |
66 }; | 66 }; |
67 | 67 |
68 enum RequestOriginPolicy { | |
69 UseDefaultOriginRestrictionsForType, | |
70 RestrictToSameOrigin, | |
71 PotentiallyCrossOriginEnabled // Indicates "potentially CORS-enabled fetch"
in HTML standard. | |
72 }; | |
73 | |
74 enum RequestInitiatorContext { | 68 enum RequestInitiatorContext { |
75 DocumentContext, | 69 DocumentContext, |
76 WorkerContext, | 70 WorkerContext, |
77 }; | 71 }; |
78 | 72 |
79 enum StoredCredentials { | 73 enum StoredCredentials { |
80 AllowStoredCredentials, | 74 AllowStoredCredentials, |
81 DoNotAllowStoredCredentials | 75 DoNotAllowStoredCredentials |
82 }; | 76 }; |
83 | 77 |
(...skipping 21 matching lines...) Expand all Loading... |
105 struct ResourceLoaderOptions { | 99 struct ResourceLoaderOptions { |
106 ResourceLoaderOptions() | 100 ResourceLoaderOptions() |
107 : sendLoadCallbacks(DoNotSendCallbacks) | 101 : sendLoadCallbacks(DoNotSendCallbacks) |
108 , sniffContent(DoNotSniffContent) | 102 , sniffContent(DoNotSniffContent) |
109 , dataBufferingPolicy(BufferData) | 103 , dataBufferingPolicy(BufferData) |
110 , allowCredentials(DoNotAllowStoredCredentials) | 104 , allowCredentials(DoNotAllowStoredCredentials) |
111 , credentialsRequested(ClientDidNotRequestCredentials) | 105 , credentialsRequested(ClientDidNotRequestCredentials) |
112 , crossOriginCredentialPolicy(DoNotAskClientForCrossOriginCredentials) | 106 , crossOriginCredentialPolicy(DoNotAskClientForCrossOriginCredentials) |
113 , securityCheck(DoSecurityCheck) | 107 , securityCheck(DoSecurityCheck) |
114 , contentSecurityPolicyOption(CheckContentSecurityPolicy) | 108 , contentSecurityPolicyOption(CheckContentSecurityPolicy) |
115 , requestOriginPolicy(UseDefaultOriginRestrictionsForType) | |
116 , requestInitiatorContext(DocumentContext) | 109 , requestInitiatorContext(DocumentContext) |
117 , mixedContentBlockingTreatment(TreatAsDefaultForType) | 110 , mixedContentBlockingTreatment(TreatAsDefaultForType) |
118 , synchronousPolicy(RequestAsynchronously) | 111 , synchronousPolicy(RequestAsynchronously) |
119 { | 112 { |
120 } | 113 } |
121 | 114 |
122 ResourceLoaderOptions( | 115 ResourceLoaderOptions( |
123 SendCallbackPolicy sendLoadCallbacks, | 116 SendCallbackPolicy sendLoadCallbacks, |
124 ContentSniffingPolicy sniffContent, | 117 ContentSniffingPolicy sniffContent, |
125 DataBufferingPolicy dataBufferingPolicy, | 118 DataBufferingPolicy dataBufferingPolicy, |
126 StoredCredentials allowCredentials, | 119 StoredCredentials allowCredentials, |
127 CredentialRequest credentialsRequested, | 120 CredentialRequest credentialsRequested, |
128 ClientCrossOriginCredentialPolicy crossOriginCredentialPolicy, | 121 ClientCrossOriginCredentialPolicy crossOriginCredentialPolicy, |
129 SecurityCheckPolicy securityCheck, | 122 SecurityCheckPolicy securityCheck, |
130 ContentSecurityPolicyCheck contentSecurityPolicyOption, | 123 ContentSecurityPolicyCheck contentSecurityPolicyOption, |
131 RequestOriginPolicy requestOriginPolicy, | |
132 RequestInitiatorContext requestInitiatorContext) | 124 RequestInitiatorContext requestInitiatorContext) |
133 : sendLoadCallbacks(sendLoadCallbacks) | 125 : sendLoadCallbacks(sendLoadCallbacks) |
134 , sniffContent(sniffContent) | 126 , sniffContent(sniffContent) |
135 , dataBufferingPolicy(dataBufferingPolicy) | 127 , dataBufferingPolicy(dataBufferingPolicy) |
136 , allowCredentials(allowCredentials) | 128 , allowCredentials(allowCredentials) |
137 , credentialsRequested(credentialsRequested) | 129 , credentialsRequested(credentialsRequested) |
138 , crossOriginCredentialPolicy(crossOriginCredentialPolicy) | 130 , crossOriginCredentialPolicy(crossOriginCredentialPolicy) |
139 , securityCheck(securityCheck) | 131 , securityCheck(securityCheck) |
140 , contentSecurityPolicyOption(contentSecurityPolicyOption) | 132 , contentSecurityPolicyOption(contentSecurityPolicyOption) |
141 , requestOriginPolicy(requestOriginPolicy) | |
142 , requestInitiatorContext(requestInitiatorContext) | 133 , requestInitiatorContext(requestInitiatorContext) |
143 , mixedContentBlockingTreatment(TreatAsDefaultForType) | 134 , mixedContentBlockingTreatment(TreatAsDefaultForType) |
144 , synchronousPolicy(RequestAsynchronously) | 135 , synchronousPolicy(RequestAsynchronously) |
145 { | 136 { |
146 } | 137 } |
147 | 138 |
148 SendCallbackPolicy sendLoadCallbacks; | 139 SendCallbackPolicy sendLoadCallbacks; |
149 ContentSniffingPolicy sniffContent; | 140 ContentSniffingPolicy sniffContent; |
150 DataBufferingPolicy dataBufferingPolicy; | 141 DataBufferingPolicy dataBufferingPolicy; |
151 StoredCredentials allowCredentials; // Whether HTTP credentials and cookies
are sent with the request. | 142 StoredCredentials allowCredentials; // Whether HTTP credentials and cookies
are sent with the request. |
152 CredentialRequest credentialsRequested; // Whether the client (e.g. XHR) wan
ted credentials in the first place. | 143 CredentialRequest credentialsRequested; // Whether the client (e.g. XHR) wan
ted credentials in the first place. |
153 ClientCrossOriginCredentialPolicy crossOriginCredentialPolicy; // Whether we
will ask the client for credentials (if we allow credentials at all). | 144 ClientCrossOriginCredentialPolicy crossOriginCredentialPolicy; // Whether we
will ask the client for credentials (if we allow credentials at all). |
154 SecurityCheckPolicy securityCheck; | 145 SecurityCheckPolicy securityCheck; |
155 ContentSecurityPolicyCheck contentSecurityPolicyOption; | 146 ContentSecurityPolicyCheck contentSecurityPolicyOption; |
156 FetchInitiatorInfo initiatorInfo; | 147 FetchInitiatorInfo initiatorInfo; |
157 RequestOriginPolicy requestOriginPolicy; | |
158 RequestInitiatorContext requestInitiatorContext; | 148 RequestInitiatorContext requestInitiatorContext; |
159 MixedContentBlockingTreatment mixedContentBlockingTreatment; | 149 MixedContentBlockingTreatment mixedContentBlockingTreatment; |
160 SynchronousPolicy synchronousPolicy; | 150 SynchronousPolicy synchronousPolicy; |
161 }; | 151 }; |
162 | 152 |
163 } // namespace WebCore | 153 } // namespace WebCore |
164 | 154 |
165 #endif // ResourceLoaderOptions_h | 155 #endif // ResourceLoaderOptions_h |
OLD | NEW |