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 #include "core/frame/csp/CSPDirectiveList.h" | 5 #include "core/frame/csp/CSPDirectiveList.h" |
6 | 6 |
7 #include "bindings/core/v8/SourceLocation.h" | 7 #include "bindings/core/v8/SourceLocation.h" |
8 #include "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
9 #include "core/dom/SecurityContext.h" | 9 #include "core/dom/SecurityContext.h" |
10 #include "core/dom/SpaceSplitString.h" | 10 #include "core/dom/SpaceSplitString.h" |
(...skipping 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1161 treatAsPublicAddress(name, value); | 1161 treatAsPublicAddress(name, value); |
1162 } else if (type == ContentSecurityPolicy::DirectiveType::RequireSRIFor && | 1162 } else if (type == ContentSecurityPolicy::DirectiveType::RequireSRIFor && |
1163 m_policy->experimentalFeaturesEnabled()) { | 1163 m_policy->experimentalFeaturesEnabled()) { |
1164 parseRequireSRIFor(name, value); | 1164 parseRequireSRIFor(name, value); |
1165 } else { | 1165 } else { |
1166 m_policy->reportUnsupportedDirective(name); | 1166 m_policy->reportUnsupportedDirective(name); |
1167 } | 1167 } |
1168 } | 1168 } |
1169 | 1169 |
1170 SourceListDirective* CSPDirectiveList::operativeDirective( | 1170 SourceListDirective* CSPDirectiveList::operativeDirective( |
1171 const ContentSecurityPolicy::DirectiveType& type) { | 1171 const ContentSecurityPolicy::DirectiveType& type) const { |
1172 switch (type) { | 1172 switch (type) { |
1173 // Directives that do not have a default directive. | 1173 // Directives that do not have a default directive. |
1174 case ContentSecurityPolicy::DirectiveType::BaseURI: | 1174 case ContentSecurityPolicy::DirectiveType::BaseURI: |
1175 return m_baseURI.get(); | 1175 return m_baseURI.get(); |
1176 case ContentSecurityPolicy::DirectiveType::DefaultSrc: | 1176 case ContentSecurityPolicy::DirectiveType::DefaultSrc: |
1177 return m_defaultSrc.get(); | 1177 return m_defaultSrc.get(); |
1178 case ContentSecurityPolicy::DirectiveType::FrameAncestors: | 1178 case ContentSecurityPolicy::DirectiveType::FrameAncestors: |
1179 return m_frameAncestors.get(); | 1179 return m_frameAncestors.get(); |
1180 case ContentSecurityPolicy::DirectiveType::FormAction: | 1180 case ContentSecurityPolicy::DirectiveType::FormAction: |
1181 return m_formAction.get(); | 1181 return m_formAction.get(); |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1281 visitor->trace(m_imgSrc); | 1281 visitor->trace(m_imgSrc); |
1282 visitor->trace(m_mediaSrc); | 1282 visitor->trace(m_mediaSrc); |
1283 visitor->trace(m_manifestSrc); | 1283 visitor->trace(m_manifestSrc); |
1284 visitor->trace(m_objectSrc); | 1284 visitor->trace(m_objectSrc); |
1285 visitor->trace(m_scriptSrc); | 1285 visitor->trace(m_scriptSrc); |
1286 visitor->trace(m_styleSrc); | 1286 visitor->trace(m_styleSrc); |
1287 visitor->trace(m_workerSrc); | 1287 visitor->trace(m_workerSrc); |
1288 } | 1288 } |
1289 | 1289 |
1290 } // namespace blink | 1290 } // namespace blink |
OLD | NEW |