| 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 "config.h" | 5 #include "config.h" |
| 6 #include "core/frame/csp/CSPDirectiveList.h" | 6 #include "core/frame/csp/CSPDirectiveList.h" |
| 7 | 7 |
| 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/frame/LocalFrame.h" | 10 #include "core/frame/LocalFrame.h" |
| (...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 753 } else if (equalIgnoringCase(name, ContentSecurityPolicy::ChildSrc)) { | 753 } else if (equalIgnoringCase(name, ContentSecurityPolicy::ChildSrc)) { |
| 754 setCSPDirective<SourceListDirective>(name, value, m_childSrc); | 754 setCSPDirective<SourceListDirective>(name, value, m_childSrc); |
| 755 } else if (equalIgnoringCase(name, ContentSecurityPolicy::FormAction)) { | 755 } else if (equalIgnoringCase(name, ContentSecurityPolicy::FormAction)) { |
| 756 setCSPDirective<SourceListDirective>(name, value, m_formAction); | 756 setCSPDirective<SourceListDirective>(name, value, m_formAction); |
| 757 } else if (equalIgnoringCase(name, ContentSecurityPolicy::PluginTypes)) { | 757 } else if (equalIgnoringCase(name, ContentSecurityPolicy::PluginTypes)) { |
| 758 setCSPDirective<MediaListDirective>(name, value, m_pluginTypes); | 758 setCSPDirective<MediaListDirective>(name, value, m_pluginTypes); |
| 759 } else if (equalIgnoringCase(name, ContentSecurityPolicy::ReflectedXSS)) { | 759 } else if (equalIgnoringCase(name, ContentSecurityPolicy::ReflectedXSS)) { |
| 760 parseReflectedXSS(name, value); | 760 parseReflectedXSS(name, value); |
| 761 } else if (equalIgnoringCase(name, ContentSecurityPolicy::Referrer)) { | 761 } else if (equalIgnoringCase(name, ContentSecurityPolicy::Referrer)) { |
| 762 parseReferrer(name, value); | 762 parseReferrer(name, value); |
| 763 } else if (equalIgnoringCase(name, ContentSecurityPolicy::UpgradeInsecureReq
uests)) { |
| 764 enableInsecureRequestsUpgrade(name, value); |
| 763 } else if (m_policy->experimentalFeaturesEnabled()) { | 765 } else if (m_policy->experimentalFeaturesEnabled()) { |
| 764 if (equalIgnoringCase(name, ContentSecurityPolicy::ManifestSrc)) | 766 if (equalIgnoringCase(name, ContentSecurityPolicy::ManifestSrc)) |
| 765 setCSPDirective<SourceListDirective>(name, value, m_manifestSrc); | 767 setCSPDirective<SourceListDirective>(name, value, m_manifestSrc); |
| 766 else if (equalIgnoringCase(name, ContentSecurityPolicy::BlockAllMixedCon
tent)) | 768 else if (equalIgnoringCase(name, ContentSecurityPolicy::BlockAllMixedCon
tent)) |
| 767 enforceStrictMixedContentChecking(name, value); | 769 enforceStrictMixedContentChecking(name, value); |
| 768 else if (equalIgnoringCase(name, ContentSecurityPolicy::UpgradeInsecureR
equests)) | |
| 769 enableInsecureRequestsUpgrade(name, value); | |
| 770 else | 770 else |
| 771 m_policy->reportUnsupportedDirective(name); | 771 m_policy->reportUnsupportedDirective(name); |
| 772 } else { | 772 } else { |
| 773 m_policy->reportUnsupportedDirective(name); | 773 m_policy->reportUnsupportedDirective(name); |
| 774 } | 774 } |
| 775 } | 775 } |
| 776 | 776 |
| 777 | 777 |
| 778 } // namespace blink | 778 } // namespace blink |
| OLD | NEW |