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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 CSPDirectiveList(ContentSecurityPolicy*, ContentSecurityPolicyHeaderType, Co
ntentSecurityPolicyHeaderSource); | 68 CSPDirectiveList(ContentSecurityPolicy*, ContentSecurityPolicyHeaderType, Co
ntentSecurityPolicyHeaderSource); |
69 | 69 |
70 bool parseDirective(const UChar* begin, const UChar* end, String& name, Stri
ng& value); | 70 bool parseDirective(const UChar* begin, const UChar* end, String& name, Stri
ng& value); |
71 void parseReportURI(const String& name, const String& value); | 71 void parseReportURI(const String& name, const String& value); |
72 void parsePluginTypes(const String& name, const String& value); | 72 void parsePluginTypes(const String& name, const String& value); |
73 void parseReflectedXSS(const String& name, const String& value); | 73 void parseReflectedXSS(const String& name, const String& value); |
74 void parseReferrer(const String& name, const String& value); | 74 void parseReferrer(const String& name, const String& value); |
75 void addDirective(const String& name, const String& value); | 75 void addDirective(const String& name, const String& value); |
76 void applySandboxPolicy(const String& name, const String& sandboxPolicy); | 76 void applySandboxPolicy(const String& name, const String& sandboxPolicy); |
77 void enforceStrictMixedContentChecking(const String& name, const String& val
ue); | 77 void enforceStrictMixedContentChecking(const String& name, const String& val
ue); |
78 void enableInsecureContentUpgrade(const String& name, const String& value); | 78 void enableInsecureRequestsUpgrade(const String& name, const String& value); |
79 | 79 |
80 template <class CSPDirectiveType> | 80 template <class CSPDirectiveType> |
81 void setCSPDirective(const String& name, const String& value, OwnPtr<CSPDire
ctiveType>&); | 81 void setCSPDirective(const String& name, const String& value, OwnPtr<CSPDire
ctiveType>&); |
82 | 82 |
83 SourceListDirective* operativeDirective(SourceListDirective*) const; | 83 SourceListDirective* operativeDirective(SourceListDirective*) const; |
84 SourceListDirective* operativeDirective(SourceListDirective*, SourceListDire
ctive* override) const; | 84 SourceListDirective* operativeDirective(SourceListDirective*, SourceListDire
ctive* override) const; |
85 void reportViolation(const String& directiveText, const String& effectiveDir
ective, const String& consoleMessage, const KURL& blockedURL) const; | 85 void reportViolation(const String& directiveText, const String& effectiveDir
ective, const String& consoleMessage, const KURL& blockedURL) const; |
86 void reportViolationWithFrame(const String& directiveText, const String& eff
ectiveDirective, const String& consoleMessage, const KURL& blockedURL, LocalFram
e*) const; | 86 void reportViolationWithFrame(const String& directiveText, const String& eff
ectiveDirective, const String& consoleMessage, const KURL& blockedURL, LocalFram
e*) const; |
87 void reportViolationWithLocation(const String& directiveText, const String&
effectiveDirective, const String& consoleMessage, const KURL& blockedURL, const
String& contextURL, const WTF::OrdinalNumber& contextLine) const; | 87 void reportViolationWithLocation(const String& directiveText, const String&
effectiveDirective, const String& consoleMessage, const KURL& blockedURL, const
String& contextURL, const WTF::OrdinalNumber& contextLine) const; |
88 void reportViolationWithState(const String& directiveText, const String& eff
ectiveDirective, const String& message, const KURL& blockedURL, ScriptState*) co
nst; | 88 void reportViolationWithState(const String& directiveText, const String& eff
ectiveDirective, const String& message, const KURL& blockedURL, ScriptState*) co
nst; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 | 141 |
142 Vector<String> m_reportEndpoints; | 142 Vector<String> m_reportEndpoints; |
143 | 143 |
144 String m_evalDisabledErrorMessage; | 144 String m_evalDisabledErrorMessage; |
145 }; | 145 }; |
146 | 146 |
147 | 147 |
148 } // namespace | 148 } // namespace |
149 | 149 |
150 #endif | 150 #endif |
OLD | NEW |