| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 void addDirective(const String& name, const String& value); | 74 void addDirective(const String& name, const String& value); |
| 75 void applySandboxPolicy(const String& name, const String& sandboxPolicy); | 75 void applySandboxPolicy(const String& name, const String& sandboxPolicy); |
| 76 | 76 |
| 77 template <class CSPDirectiveType> | 77 template <class CSPDirectiveType> |
| 78 void setCSPDirective(const String& name, const String& value, OwnPtr<CSPDire
ctiveType>&); | 78 void setCSPDirective(const String& name, const String& value, OwnPtr<CSPDire
ctiveType>&); |
| 79 | 79 |
| 80 SourceListDirective* operativeDirective(SourceListDirective*) const; | 80 SourceListDirective* operativeDirective(SourceListDirective*) const; |
| 81 SourceListDirective* operativeDirective(SourceListDirective*, SourceListDire
ctive* override) const; | 81 SourceListDirective* operativeDirective(SourceListDirective*, SourceListDire
ctive* override) const; |
| 82 void reportViolation(const String& directiveText, const String& effectiveDir
ective, const String& consoleMessage, const KURL& blockedURL) const; | 82 void reportViolation(const String& directiveText, const String& effectiveDir
ective, const String& consoleMessage, const KURL& blockedURL) const; |
| 83 void reportViolationWithLocation(const String& directiveText, const String&
effectiveDirective, const String& consoleMessage, const KURL& blockedURL, const
String& contextURL, const WTF::OrdinalNumber& contextLine) const; | 83 void reportViolationWithLocation(const String& directiveText, const String&
effectiveDirective, const String& consoleMessage, const KURL& blockedURL, const
String& contextURL, const WTF::OrdinalNumber& contextLine) const; |
| 84 void reportViolationWithState(const String& directiveText, const String& eff
ectiveDirective, const String& consoleMessage, const KURL& blockedURL, ScriptSta
te*) const; | 84 void reportViolationWithState(const String& directiveText, const String& eff
ectiveDirective, const String& message, const KURL& blockedURL, ScriptState*) co
nst; |
| 85 | 85 |
| 86 bool checkEval(SourceListDirective*) const; | 86 bool checkEval(SourceListDirective*) const; |
| 87 bool checkInline(SourceListDirective*) const; | 87 bool checkInline(SourceListDirective*) const; |
| 88 bool checkNonce(SourceListDirective*, const String&) const; | 88 bool checkNonce(SourceListDirective*, const String&) const; |
| 89 bool checkHash(SourceListDirective*, const CSPHashValue&) const; | 89 bool checkHash(SourceListDirective*, const CSPHashValue&) const; |
| 90 bool checkSource(SourceListDirective*, const KURL&) const; | 90 bool checkSource(SourceListDirective*, const KURL&) const; |
| 91 bool checkMediaType(MediaListDirective*, const String& type, const String& t
ypeAttribute) const; | 91 bool checkMediaType(MediaListDirective*, const String& type, const String& t
ypeAttribute) const; |
| 92 bool checkAncestors(SourceListDirective*, LocalFrame*) const; | 92 bool checkAncestors(SourceListDirective*, LocalFrame*) const; |
| 93 | 93 |
| 94 void setEvalDisabledErrorMessage(const String& errorMessage) { m_evalDisable
dErrorMessage = errorMessage; } | 94 void setEvalDisabledErrorMessage(const String& errorMessage) { m_evalDisable
dErrorMessage = errorMessage; } |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 132 |
| 133 Vector<KURL> m_reportURIs; | 133 Vector<KURL> m_reportURIs; |
| 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 |