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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 class OrdinalNumber; | 50 class OrdinalNumber; |
51 } | 51 } |
52 | 52 |
53 namespace blink { | 53 namespace blink { |
54 | 54 |
55 class ContentSecurityPolicyResponseHeaders; | 55 class ContentSecurityPolicyResponseHeaders; |
56 class ConsoleMessage; | 56 class ConsoleMessage; |
57 class CSPDirectiveList; | 57 class CSPDirectiveList; |
58 class CSPSource; | 58 class CSPSource; |
59 class Document; | 59 class Document; |
| 60 class Element; |
60 class FrameLoaderClient; | 61 class FrameLoaderClient; |
61 class KURL; | 62 class KURL; |
62 class ResourceRequest; | 63 class ResourceRequest; |
63 class SecurityOrigin; | 64 class SecurityOrigin; |
64 | 65 |
65 typedef int SandboxFlags; | 66 typedef int SandboxFlags; |
66 typedef HeapVector<Member<CSPDirectiveList>> CSPDirectiveListVector; | 67 typedef HeapVector<Member<CSPDirectiveList>> CSPDirectiveListVector; |
67 typedef HeapVector<Member<ConsoleMessage>> ConsoleMessageVector; | 68 typedef HeapVector<Member<ConsoleMessage>> ConsoleMessageVector; |
68 typedef std::pair<String, ContentSecurityPolicyHeaderType> CSPHeaderAndType; | 69 typedef std::pair<String, ContentSecurityPolicyHeaderType> CSPHeaderAndType; |
69 using RedirectStatus = ResourceRequest::RedirectStatus; | 70 using RedirectStatus = ResourceRequest::RedirectStatus; |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 bool selfMatchesInnerURL() const; | 274 bool selfMatchesInnerURL() const; |
274 | 275 |
275 bool experimentalFeaturesEnabled() const; | 276 bool experimentalFeaturesEnabled() const; |
276 | 277 |
277 bool shouldSendCSPHeader(Resource::Type) const; | 278 bool shouldSendCSPHeader(Resource::Type) const; |
278 | 279 |
279 static bool shouldBypassMainWorld(const ExecutionContext*); | 280 static bool shouldBypassMainWorld(const ExecutionContext*); |
280 | 281 |
281 static bool isDirectiveName(const String&); | 282 static bool isDirectiveName(const String&); |
282 | 283 |
| 284 static bool isNonceableElement(const Element*); |
| 285 |
283 Document* document() const; | 286 Document* document() const; |
284 | 287 |
285 private: | 288 private: |
286 FRIEND_TEST_ALL_PREFIXES(ContentSecurityPolicyTest, NonceInline); | 289 FRIEND_TEST_ALL_PREFIXES(ContentSecurityPolicyTest, NonceInline); |
287 FRIEND_TEST_ALL_PREFIXES(ContentSecurityPolicyTest, NonceSinglePolicy); | 290 FRIEND_TEST_ALL_PREFIXES(ContentSecurityPolicyTest, NonceSinglePolicy); |
288 FRIEND_TEST_ALL_PREFIXES(ContentSecurityPolicyTest, NonceMultiplePolicy); | 291 FRIEND_TEST_ALL_PREFIXES(ContentSecurityPolicyTest, NonceMultiplePolicy); |
289 | 292 |
290 ContentSecurityPolicy(); | 293 ContentSecurityPolicy(); |
291 | 294 |
292 void applyPolicySideEffectsToExecutionContext(); | 295 void applyPolicySideEffectsToExecutionContext(); |
(...skipping 27 matching lines...) Expand all Loading... |
320 String m_disableEvalErrorMessage; | 323 String m_disableEvalErrorMessage; |
321 WebInsecureRequestPolicy m_insecureRequestPolicy; | 324 WebInsecureRequestPolicy m_insecureRequestPolicy; |
322 | 325 |
323 Member<CSPSource> m_selfSource; | 326 Member<CSPSource> m_selfSource; |
324 String m_selfProtocol; | 327 String m_selfProtocol; |
325 }; | 328 }; |
326 | 329 |
327 } // namespace blink | 330 } // namespace blink |
328 | 331 |
329 #endif | 332 #endif |
OLD | NEW |