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

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

Issue 2532913002: Unreverting Embedding-CSP: Refactoring directive strings into enum. (Closed)
Patch Set: Created 4 years 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 | « no previous file | third_party/WebKit/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" 8 #include "core/fetch/Resource.h"
9 #include "core/frame/csp/ContentSecurityPolicy.h" 9 #include "core/frame/csp/ContentSecurityPolicy.h"
10 #include "core/frame/csp/MediaListDirective.h" 10 #include "core/frame/csp/MediaListDirective.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 183
184 template <class CSPDirectiveType> 184 template <class CSPDirectiveType>
185 void setCSPDirective(const String& name, 185 void setCSPDirective(const String& name,
186 const String& value, 186 const String& value,
187 Member<CSPDirectiveType>&); 187 Member<CSPDirectiveType>&);
188 188
189 SourceListDirective* operativeDirective(SourceListDirective*) const; 189 SourceListDirective* operativeDirective(SourceListDirective*) const;
190 SourceListDirective* operativeDirective(SourceListDirective*, 190 SourceListDirective* operativeDirective(SourceListDirective*,
191 SourceListDirective* override) const; 191 SourceListDirective* override) const;
192 void reportViolation(const String& directiveText, 192 void reportViolation(const String& directiveText,
193 const String& effectiveDirective, 193 const ContentSecurityPolicy::DirectiveType&,
194 const String& consoleMessage, 194 const String& consoleMessage,
195 const KURL& blockedURL, 195 const KURL& blockedURL,
196 ResourceRequest::RedirectStatus) const; 196 ResourceRequest::RedirectStatus) const;
197 void reportViolationWithFrame(const String& directiveText, 197 void reportViolationWithFrame(const String& directiveText,
198 const String& effectiveDirective, 198 const ContentSecurityPolicy::DirectiveType&,
199 const String& consoleMessage, 199 const String& consoleMessage,
200 const KURL& blockedURL, 200 const KURL& blockedURL,
201 LocalFrame*) const; 201 LocalFrame*) const;
202 void reportViolationWithLocation(const String& directiveText, 202 void reportViolationWithLocation(const String& directiveText,
203 const String& effectiveDirective, 203 const ContentSecurityPolicy::DirectiveType&,
204 const String& consoleMessage, 204 const String& consoleMessage,
205 const KURL& blockedURL, 205 const KURL& blockedURL,
206 const String& contextURL, 206 const String& contextURL,
207 const WTF::OrdinalNumber& contextLine, 207 const WTF::OrdinalNumber& contextLine,
208 Element*) const; 208 Element*) const;
209 void reportViolationWithState( 209 void reportViolationWithState(
210 const String& directiveText, 210 const String& directiveText,
211 const String& effectiveDirective, 211 const ContentSecurityPolicy::DirectiveType&,
212 const String& message, 212 const String& message,
213 const KURL& blockedURL, 213 const KURL& blockedURL,
214 ScriptState*, 214 ScriptState*,
215 const ContentSecurityPolicy::ExceptionStatus) const; 215 const ContentSecurityPolicy::ExceptionStatus) const;
216 216
217 bool checkEval(SourceListDirective*) const; 217 bool checkEval(SourceListDirective*) const;
218 bool checkInline(SourceListDirective*) const; 218 bool checkInline(SourceListDirective*) const;
219 bool checkDynamic(SourceListDirective*) const; 219 bool checkDynamic(SourceListDirective*) const;
220 bool isMatchingNoncePresent(SourceListDirective*, const String&) const; 220 bool isMatchingNoncePresent(SourceListDirective*, const String&) const;
221 bool checkHash(SourceListDirective*, const CSPHashValue&) const; 221 bool checkHash(SourceListDirective*, const CSPHashValue&) const;
(...skipping 18 matching lines...) Expand all
240 ContentSecurityPolicy::ExceptionStatus = 240 ContentSecurityPolicy::ExceptionStatus =
241 ContentSecurityPolicy::WillNotThrowException) const; 241 ContentSecurityPolicy::WillNotThrowException) const;
242 bool checkInlineAndReportViolation(SourceListDirective*, 242 bool checkInlineAndReportViolation(SourceListDirective*,
243 const String& consoleMessage, 243 const String& consoleMessage,
244 Element*, 244 Element*,
245 const String& contextURL, 245 const String& contextURL,
246 const WTF::OrdinalNumber& contextLine, 246 const WTF::OrdinalNumber& contextLine,
247 bool isScript, 247 bool isScript,
248 const String& hashValue) const; 248 const String& hashValue) const;
249 249
250 bool checkSourceAndReportViolation(SourceListDirective*, 250 bool checkSourceAndReportViolation(
251 const KURL&, 251 SourceListDirective*,
252 const String& effectiveDirective, 252 const KURL&,
253 ResourceRequest::RedirectStatus) const; 253 const ContentSecurityPolicy::DirectiveType&,
254 ResourceRequest::RedirectStatus) const;
254 bool checkMediaTypeAndReportViolation(MediaListDirective*, 255 bool checkMediaTypeAndReportViolation(MediaListDirective*,
255 const String& type, 256 const String& type,
256 const String& typeAttribute, 257 const String& typeAttribute,
257 const String& consoleMessage) const; 258 const String& consoleMessage) const;
258 bool checkAncestorsAndReportViolation(SourceListDirective*, 259 bool checkAncestorsAndReportViolation(SourceListDirective*,
259 LocalFrame*, 260 LocalFrame*,
260 const KURL&) const; 261 const KURL&) const;
261 bool checkRequestWithoutIntegrityAndReportViolation( 262 bool checkRequestWithoutIntegrityAndReportViolation(
262 WebURLRequest::RequestContext, 263 WebURLRequest::RequestContext,
263 const KURL&, 264 const KURL&,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 uint8_t m_requireSRIFor; 299 uint8_t m_requireSRIFor;
299 300
300 Vector<String> m_reportEndpoints; 301 Vector<String> m_reportEndpoints;
301 302
302 String m_evalDisabledErrorMessage; 303 String m_evalDisabledErrorMessage;
303 }; 304 };
304 305
305 } // namespace blink 306 } // namespace blink
306 307
307 #endif 308 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698