OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CSPDirectiveList_h | 5 #ifndef CSPDirectiveList_h |
6 #define CSPDirectiveList_h | 6 #define CSPDirectiveList_h |
7 | 7 |
8 #include "core/fetch/Resource.h" | 8 #include "core/fetch/Resource.h" |
9 #include "core/frame/csp/ContentSecurityPolicy.h" | 9 #include "core/frame/csp/ContentSecurityPolicy.h" |
10 #include "core/frame/csp/MediaListDirective.h" | 10 #include "core/frame/csp/MediaListDirective.h" |
11 #include "core/frame/csp/SourceListDirective.h" | 11 #include "core/frame/csp/SourceListDirective.h" |
| 12 #include "platform/heap/Handle.h" |
12 #include "platform/network/ContentSecurityPolicyParsers.h" | 13 #include "platform/network/ContentSecurityPolicyParsers.h" |
13 #include "platform/network/HTTPParsers.h" | 14 #include "platform/network/HTTPParsers.h" |
14 #include "platform/weborigin/KURL.h" | 15 #include "platform/weborigin/KURL.h" |
15 #include "platform/weborigin/ReferrerPolicy.h" | 16 #include "platform/weborigin/ReferrerPolicy.h" |
16 #include "wtf/OwnPtr.h" | 17 #include "wtf/OwnPtr.h" |
17 #include "wtf/Vector.h" | 18 #include "wtf/Vector.h" |
18 #include "wtf/text/WTFString.h" | 19 #include "wtf/text/WTFString.h" |
19 | 20 |
20 namespace blink { | 21 namespace blink { |
21 | 22 |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 | 117 |
117 bool checkEvalAndReportViolation(SourceListDirective*, const String& console
Message, ScriptState*, ContentSecurityPolicy::ExceptionStatus = ContentSecurityP
olicy::WillNotThrowException) const; | 118 bool checkEvalAndReportViolation(SourceListDirective*, const String& console
Message, ScriptState*, ContentSecurityPolicy::ExceptionStatus = ContentSecurityP
olicy::WillNotThrowException) const; |
118 bool checkInlineAndReportViolation(SourceListDirective*, const String& conso
leMessage, const String& contextURL, const WTF::OrdinalNumber& contextLine, bool
isScript, const String& hashValue) const; | 119 bool checkInlineAndReportViolation(SourceListDirective*, const String& conso
leMessage, const String& contextURL, const WTF::OrdinalNumber& contextLine, bool
isScript, const String& hashValue) const; |
119 | 120 |
120 bool checkSourceAndReportViolation(SourceListDirective*, const KURL&, const
String& effectiveDirective, ContentSecurityPolicy::RedirectStatus) const; | 121 bool checkSourceAndReportViolation(SourceListDirective*, const KURL&, const
String& effectiveDirective, ContentSecurityPolicy::RedirectStatus) const; |
121 bool checkMediaTypeAndReportViolation(MediaListDirective*, const String& typ
e, const String& typeAttribute, const String& consoleMessage) const; | 122 bool checkMediaTypeAndReportViolation(MediaListDirective*, const String& typ
e, const String& typeAttribute, const String& consoleMessage) const; |
122 bool checkAncestorsAndReportViolation(SourceListDirective*, LocalFrame*, con
st KURL&) const; | 123 bool checkAncestorsAndReportViolation(SourceListDirective*, LocalFrame*, con
st KURL&) const; |
123 | 124 |
124 bool denyIfEnforcingPolicy() const { return m_reportOnly; } | 125 bool denyIfEnforcingPolicy() const { return m_reportOnly; } |
125 | 126 |
126 ContentSecurityPolicy* m_policy; | 127 // TODO(Oilpan): consider moving ContentSecurityPolicy auxilliary objects to
the heap. |
| 128 RawPtrWillBeUntracedMember<ContentSecurityPolicy> m_policy; |
127 | 129 |
128 String m_header; | 130 String m_header; |
129 ContentSecurityPolicyHeaderType m_headerType; | 131 ContentSecurityPolicyHeaderType m_headerType; |
130 ContentSecurityPolicyHeaderSource m_headerSource; | 132 ContentSecurityPolicyHeaderSource m_headerSource; |
131 | 133 |
132 bool m_reportOnly; | 134 bool m_reportOnly; |
133 bool m_hasSandboxPolicy; | 135 bool m_hasSandboxPolicy; |
134 bool m_hasSuboriginPolicy; | 136 bool m_hasSuboriginPolicy; |
135 ReflectedXSSDisposition m_reflectedXSSDisposition; | 137 ReflectedXSSDisposition m_reflectedXSSDisposition; |
136 | 138 |
(...skipping 22 matching lines...) Expand all Loading... |
159 | 161 |
160 Vector<String> m_reportEndpoints; | 162 Vector<String> m_reportEndpoints; |
161 | 163 |
162 String m_evalDisabledErrorMessage; | 164 String m_evalDisabledErrorMessage; |
163 }; | 165 }; |
164 | 166 |
165 | 167 |
166 } // namespace | 168 } // namespace |
167 | 169 |
168 #endif | 170 #endif |
OLD | NEW |