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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 enum ClientCrossOriginCredentialPolicy { | 53 enum ClientCrossOriginCredentialPolicy { |
54 AskClientForCrossOriginCredentials, | 54 AskClientForCrossOriginCredentials, |
55 DoNotAskClientForCrossOriginCredentials | 55 DoNotAskClientForCrossOriginCredentials |
56 }; | 56 }; |
57 | 57 |
58 enum SecurityCheckPolicy { | 58 enum SecurityCheckPolicy { |
59 SkipSecurityCheck, | 59 SkipSecurityCheck, |
60 DoSecurityCheck | 60 DoSecurityCheck |
61 }; | 61 }; |
62 | 62 |
| 63 enum ContentSecurityPolicyCheck { |
| 64 CheckContentSecurityPolicy, |
| 65 DoNotCheckContentSecurityPolicy |
| 66 }; |
| 67 |
63 struct ResourceLoaderOptions { | 68 struct ResourceLoaderOptions { |
64 ResourceLoaderOptions() | 69 ResourceLoaderOptions() |
65 : sendLoadCallbacks(DoNotSendCallbacks) | 70 : sendLoadCallbacks(DoNotSendCallbacks) |
66 , sniffContent(DoNotSniffContent) | 71 , sniffContent(DoNotSniffContent) |
67 , dataBufferingPolicy(BufferData) | 72 , dataBufferingPolicy(BufferData) |
68 , allowCredentials(DoNotAllowStoredCredentials) | 73 , allowCredentials(DoNotAllowStoredCredentials) |
69 , credentialsRequested(ClientDidNotRequestCredentials) | 74 , credentialsRequested(ClientDidNotRequestCredentials) |
70 , crossOriginCredentialPolicy(DoNotAskClientForCrossOriginCredentials) | 75 , crossOriginCredentialPolicy(DoNotAskClientForCrossOriginCredentials) |
71 , securityCheck(DoSecurityCheck) { } | 76 , securityCheck(DoSecurityCheck) |
| 77 , contentSecurityPolicyOption(CheckContentSecurityPolicy) { } |
72 | 78 |
73 ResourceLoaderOptions( | 79 ResourceLoaderOptions( |
74 SendCallbackPolicy sendLoadCallbacks, | 80 SendCallbackPolicy sendLoadCallbacks, |
75 ContentSniffingPolicy sniffContent, | 81 ContentSniffingPolicy sniffContent, |
76 DataBufferingPolicy dataBufferingPolicy, | 82 DataBufferingPolicy dataBufferingPolicy, |
77 StoredCredentials allowCredentials, | 83 StoredCredentials allowCredentials, |
78 CredentialRequest credentialsRequested, | 84 CredentialRequest credentialsRequested, |
79 ClientCrossOriginCredentialPolicy crossOriginCredentialPolicy, | 85 ClientCrossOriginCredentialPolicy crossOriginCredentialPolicy, |
80 SecurityCheckPolicy securityCheck) | 86 SecurityCheckPolicy securityCheck, |
| 87 ContentSecurityPolicyCheck contentSecurityPolicyOption) |
81 : sendLoadCallbacks(sendLoadCallbacks) | 88 : sendLoadCallbacks(sendLoadCallbacks) |
82 , sniffContent(sniffContent) | 89 , sniffContent(sniffContent) |
83 , dataBufferingPolicy(dataBufferingPolicy) | 90 , dataBufferingPolicy(dataBufferingPolicy) |
84 , allowCredentials(allowCredentials) | 91 , allowCredentials(allowCredentials) |
85 , credentialsRequested(credentialsRequested) | 92 , credentialsRequested(credentialsRequested) |
86 , crossOriginCredentialPolicy(crossOriginCredentialPolicy) | 93 , crossOriginCredentialPolicy(crossOriginCredentialPolicy) |
87 , securityCheck(securityCheck) | 94 , securityCheck(securityCheck) |
| 95 , contentSecurityPolicyOption(contentSecurityPolicyOption) |
88 { | 96 { |
89 } | 97 } |
90 SendCallbackPolicy sendLoadCallbacks; | 98 SendCallbackPolicy sendLoadCallbacks; |
91 ContentSniffingPolicy sniffContent; | 99 ContentSniffingPolicy sniffContent; |
92 DataBufferingPolicy dataBufferingPolicy; | 100 DataBufferingPolicy dataBufferingPolicy; |
93 StoredCredentials allowCredentials; // Whether HTTP credentials and cookies
are sent with the request. | 101 StoredCredentials allowCredentials; // Whether HTTP credentials and cookies
are sent with the request. |
94 CredentialRequest credentialsRequested; // Whether the client (e.g. XHR) wan
ted credentials in the first place. | 102 CredentialRequest credentialsRequested; // Whether the client (e.g. XHR) wan
ted credentials in the first place. |
95 ClientCrossOriginCredentialPolicy crossOriginCredentialPolicy; // Whether we
will ask the client for credentials (if we allow credentials at all). | 103 ClientCrossOriginCredentialPolicy crossOriginCredentialPolicy; // Whether we
will ask the client for credentials (if we allow credentials at all). |
96 SecurityCheckPolicy securityCheck; | 104 SecurityCheckPolicy securityCheck; |
| 105 ContentSecurityPolicyCheck contentSecurityPolicyOption; |
97 }; | 106 }; |
98 | 107 |
99 } // namespace WebCore | 108 } // namespace WebCore |
100 | 109 |
101 #endif // ResourceLoaderOptions_h | 110 #endif // ResourceLoaderOptions_h |
OLD | NEW |