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

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

Issue 1136843011: Revert of Add CSP header for resources with an active policy (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « Source/core/fetch/ResourceFetcher.cpp ('k') | Source/core/frame/csp/CSPDirectiveList.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 #ifndef CSPDirectiveList_h 5 #ifndef CSPDirectiveList_h
6 #define CSPDirectiveList_h 6 #define CSPDirectiveList_h
7 7
8 #include "core/fetch/Resource.h"
9 #include "core/frame/csp/ContentSecurityPolicy.h" 8 #include "core/frame/csp/ContentSecurityPolicy.h"
10 #include "core/frame/csp/MediaListDirective.h" 9 #include "core/frame/csp/MediaListDirective.h"
11 #include "core/frame/csp/SourceListDirective.h" 10 #include "core/frame/csp/SourceListDirective.h"
12 #include "platform/network/ContentSecurityPolicyParsers.h" 11 #include "platform/network/ContentSecurityPolicyParsers.h"
13 #include "platform/network/HTTPParsers.h" 12 #include "platform/network/HTTPParsers.h"
14 #include "platform/weborigin/KURL.h" 13 #include "platform/weborigin/KURL.h"
15 #include "platform/weborigin/ReferrerPolicy.h" 14 #include "platform/weborigin/ReferrerPolicy.h"
16 #include "wtf/OwnPtr.h" 15 #include "wtf/OwnPtr.h"
17 #include "wtf/Vector.h" 16 #include "wtf/Vector.h"
18 #include "wtf/text/WTFString.h" 17 #include "wtf/text/WTFString.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 ReferrerPolicy referrerPolicy() const { return m_referrerPolicy; } 68 ReferrerPolicy referrerPolicy() const { return m_referrerPolicy; }
70 bool didSetReferrerPolicy() const { return m_didSetReferrerPolicy; } 69 bool didSetReferrerPolicy() const { return m_didSetReferrerPolicy; }
71 bool isReportOnly() const { return m_reportOnly; } 70 bool isReportOnly() const { return m_reportOnly; }
72 const Vector<String>& reportEndpoints() const { return m_reportEndpoints; } 71 const Vector<String>& reportEndpoints() const { return m_reportEndpoints; }
73 72
74 // Used to copy plugin-types into a plugin document in a nested 73 // Used to copy plugin-types into a plugin document in a nested
75 // browsing context. 74 // browsing context.
76 bool hasPluginTypes() const { return !!m_pluginTypes; }; 75 bool hasPluginTypes() const { return !!m_pluginTypes; };
77 const String& pluginTypesText() const; 76 const String& pluginTypesText() const;
78 77
79 bool shouldSendCSPHeader(Resource::Type) const;
80
81 private: 78 private:
82 CSPDirectiveList(ContentSecurityPolicy*, ContentSecurityPolicyHeaderType, Co ntentSecurityPolicyHeaderSource); 79 CSPDirectiveList(ContentSecurityPolicy*, ContentSecurityPolicyHeaderType, Co ntentSecurityPolicyHeaderSource);
83 80
84 bool parseDirective(const UChar* begin, const UChar* end, String& name, Stri ng& value); 81 bool parseDirective(const UChar* begin, const UChar* end, String& name, Stri ng& value);
85 void parseReportURI(const String& name, const String& value); 82 void parseReportURI(const String& name, const String& value);
86 void parsePluginTypes(const String& name, const String& value); 83 void parsePluginTypes(const String& name, const String& value);
87 void parseReflectedXSS(const String& name, const String& value); 84 void parseReflectedXSS(const String& name, const String& value);
88 void parseReferrer(const String& name, const String& value); 85 void parseReferrer(const String& name, const String& value);
89 void addDirective(const String& name, const String& value); 86 void addDirective(const String& name, const String& value);
90 void applySandboxPolicy(const String& name, const String& sandboxPolicy); 87 void applySandboxPolicy(const String& name, const String& sandboxPolicy);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 152
156 Vector<String> m_reportEndpoints; 153 Vector<String> m_reportEndpoints;
157 154
158 String m_evalDisabledErrorMessage; 155 String m_evalDisabledErrorMessage;
159 }; 156 };
160 157
161 158
162 } // namespace 159 } // namespace
163 160
164 #endif 161 #endif
OLDNEW
« no previous file with comments | « Source/core/fetch/ResourceFetcher.cpp ('k') | Source/core/frame/csp/CSPDirectiveList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698