| 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/frame/csp/ContentSecurityPolicy.h" | 8 #include "core/frame/csp/ContentSecurityPolicy.h" |
| 9 #include "core/frame/csp/MediaListDirective.h" | 9 #include "core/frame/csp/MediaListDirective.h" |
| 10 #include "core/frame/csp/SourceListDirective.h" | 10 #include "core/frame/csp/SourceListDirective.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 bool allowScriptNonce(const String&) const; | 54 bool allowScriptNonce(const String&) const; |
| 55 bool allowStyleNonce(const String&) const; | 55 bool allowStyleNonce(const String&) const; |
| 56 bool allowScriptHash(const CSPHashValue&) const; | 56 bool allowScriptHash(const CSPHashValue&) const; |
| 57 bool allowStyleHash(const CSPHashValue&) const; | 57 bool allowStyleHash(const CSPHashValue&) const; |
| 58 | 58 |
| 59 const String& evalDisabledErrorMessage() const { return m_evalDisabledErrorM
essage; } | 59 const String& evalDisabledErrorMessage() const { return m_evalDisabledErrorM
essage; } |
| 60 ReflectedXSSDisposition reflectedXSSDisposition() const { return m_reflected
XSSDisposition; } | 60 ReflectedXSSDisposition reflectedXSSDisposition() const { return m_reflected
XSSDisposition; } |
| 61 ReferrerPolicy referrerPolicy() const { return m_referrerPolicy; } | 61 ReferrerPolicy referrerPolicy() const { return m_referrerPolicy; } |
| 62 bool didSetReferrerPolicy() const { return m_didSetReferrerPolicy; } | 62 bool didSetReferrerPolicy() const { return m_didSetReferrerPolicy; } |
| 63 bool isReportOnly() const { return m_reportOnly; } | 63 bool isReportOnly() const { return m_reportOnly; } |
| 64 const Vector<KURL>& reportURIs() const { return m_reportURIs; } | 64 const Vector<String>& reportEndpoints() const { return m_reportEndpoints; } |
| 65 | 65 |
| 66 private: | 66 private: |
| 67 CSPDirectiveList(ContentSecurityPolicy*, ContentSecurityPolicyHeaderType, Co
ntentSecurityPolicyHeaderSource); | 67 CSPDirectiveList(ContentSecurityPolicy*, ContentSecurityPolicyHeaderType, Co
ntentSecurityPolicyHeaderSource); |
| 68 | 68 |
| 69 bool parseDirective(const UChar* begin, const UChar* end, String& name, Stri
ng& value); | 69 bool parseDirective(const UChar* begin, const UChar* end, String& name, Stri
ng& value); |
| 70 void parseReportURI(const String& name, const String& value); | 70 void parseReportURI(const String& name, const String& value); |
| 71 void parsePluginTypes(const String& name, const String& value); | 71 void parsePluginTypes(const String& name, const String& value); |
| 72 void parseReflectedXSS(const String& name, const String& value); | 72 void parseReflectedXSS(const String& name, const String& value); |
| 73 void parseReferrer(const String& name, const String& value); | 73 void parseReferrer(const String& name, const String& value); |
| 74 void addDirective(const String& name, const String& value); | 74 void addDirective(const String& name, const String& value); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 OwnPtr<SourceListDirective> m_fontSrc; | 123 OwnPtr<SourceListDirective> m_fontSrc; |
| 124 OwnPtr<SourceListDirective> m_formAction; | 124 OwnPtr<SourceListDirective> m_formAction; |
| 125 OwnPtr<SourceListDirective> m_frameAncestors; | 125 OwnPtr<SourceListDirective> m_frameAncestors; |
| 126 OwnPtr<SourceListDirective> m_frameSrc; | 126 OwnPtr<SourceListDirective> m_frameSrc; |
| 127 OwnPtr<SourceListDirective> m_imgSrc; | 127 OwnPtr<SourceListDirective> m_imgSrc; |
| 128 OwnPtr<SourceListDirective> m_mediaSrc; | 128 OwnPtr<SourceListDirective> m_mediaSrc; |
| 129 OwnPtr<SourceListDirective> m_objectSrc; | 129 OwnPtr<SourceListDirective> m_objectSrc; |
| 130 OwnPtr<SourceListDirective> m_scriptSrc; | 130 OwnPtr<SourceListDirective> m_scriptSrc; |
| 131 OwnPtr<SourceListDirective> m_styleSrc; | 131 OwnPtr<SourceListDirective> m_styleSrc; |
| 132 | 132 |
| 133 Vector<KURL> m_reportURIs; | 133 Vector<String> m_reportEndpoints; |
| 134 | 134 |
| 135 String m_evalDisabledErrorMessage; | 135 String m_evalDisabledErrorMessage; |
| 136 }; | 136 }; |
| 137 | 137 |
| 138 | 138 |
| 139 } // namespace | 139 } // namespace |
| 140 | 140 |
| 141 #endif | 141 #endif |
| OLD | NEW |