Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Side by Side Diff: Source/core/frame/csp/CSPDirectiveList.cpp

Issue 1032473002: Ship "Upgrade Insecure Requests". (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: CSPTest Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/frame/csp/ContentSecurityPolicyTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | Source/core/frame/csp/ContentSecurityPolicyTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698