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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 // on the floor if no such context is available). | 192 // on the floor if no such context is available). |
193 void reportViolation(const String& directiveText, const String& effectiveDir
ective, const String& consoleMessage, const KURL& blockedURL, const Vector<Strin
g>& reportEndpoints, const String& header, LocalFrame* = nullptr); | 193 void reportViolation(const String& directiveText, const String& effectiveDir
ective, const String& consoleMessage, const KURL& blockedURL, const Vector<Strin
g>& reportEndpoints, const String& header, LocalFrame* = nullptr); |
194 | 194 |
195 void reportBlockedScriptExecutionToInspector(const String& directiveText) co
nst; | 195 void reportBlockedScriptExecutionToInspector(const String& directiveText) co
nst; |
196 | 196 |
197 const KURL url() const; | 197 const KURL url() const; |
198 void enforceSandboxFlags(SandboxFlags); | 198 void enforceSandboxFlags(SandboxFlags); |
199 void enforceStrictMixedContentChecking(); | 199 void enforceStrictMixedContentChecking(); |
200 String evalDisabledErrorMessage() const; | 200 String evalDisabledErrorMessage() const; |
201 | 201 |
202 void setInsecureContentPolicy(SecurityContext::InsecureContentPolicy); | 202 void setInsecureRequestsPolicy(SecurityContext::InsecureRequestsPolicy); |
203 SecurityContext::InsecureContentPolicy insecureContentPolicy() const { retur
n m_insecureContentPolicy; }; | 203 SecurityContext::InsecureRequestsPolicy insecureRequestsPolicy() const { ret
urn m_insecureRequestsPolicy; }; |
204 | 204 |
205 bool urlMatchesSelf(const KURL&) const; | 205 bool urlMatchesSelf(const KURL&) const; |
206 bool protocolMatchesSelf(const KURL&) const; | 206 bool protocolMatchesSelf(const KURL&) const; |
207 | 207 |
208 bool experimentalFeaturesEnabled() const; | 208 bool experimentalFeaturesEnabled() const; |
209 | 209 |
210 static bool shouldBypassMainWorld(const ExecutionContext*); | 210 static bool shouldBypassMainWorld(const ExecutionContext*); |
211 | 211 |
212 static bool isDirectiveName(const String&); | 212 static bool isDirectiveName(const String&); |
213 | 213 |
(...skipping 23 matching lines...) Expand all Loading... |
237 // to calculate a hash once and then distribute it to all of the directives | 237 // to calculate a hash once and then distribute it to all of the directives |
238 // for validation. | 238 // for validation. |
239 uint8_t m_scriptHashAlgorithmsUsed; | 239 uint8_t m_scriptHashAlgorithmsUsed; |
240 uint8_t m_styleHashAlgorithmsUsed; | 240 uint8_t m_styleHashAlgorithmsUsed; |
241 | 241 |
242 // State flags used to configure the environment after parsing a policy. | 242 // State flags used to configure the environment after parsing a policy. |
243 SandboxFlags m_sandboxMask; | 243 SandboxFlags m_sandboxMask; |
244 bool m_enforceStrictMixedContentChecking; | 244 bool m_enforceStrictMixedContentChecking; |
245 ReferrerPolicy m_referrerPolicy; | 245 ReferrerPolicy m_referrerPolicy; |
246 String m_disableEvalErrorMessage; | 246 String m_disableEvalErrorMessage; |
247 SecurityContext::InsecureContentPolicy m_insecureContentPolicy; | 247 SecurityContext::InsecureRequestsPolicy m_insecureRequestsPolicy; |
248 | 248 |
249 OwnPtr<CSPSource> m_selfSource; | 249 OwnPtr<CSPSource> m_selfSource; |
250 String m_selfProtocol; | 250 String m_selfProtocol; |
251 }; | 251 }; |
252 | 252 |
253 } | 253 } |
254 | 254 |
255 #endif | 255 #endif |
OLD | NEW |