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

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

Issue 1367933003: CSP source *.x.y should not match host x.y (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 5 years, 2 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google, Inc. All rights reserved. 2 * Copyright (C) 2011 Google, Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 253
254 // These functions are used to debug using ResourceContext to apply 254 // These functions are used to debug using ResourceContext to apply
255 // CSP directives instead of Resource::Type, by checking that the 255 // CSP directives instead of Resource::Type, by checking that the
256 // ResourceContext is as expected. See crbug.com/474412 256 // ResourceContext is as expected. See crbug.com/474412
257 static bool isScriptResource(const ResourceRequest&); 257 static bool isScriptResource(const ResourceRequest&);
258 static bool isStyleResource(const ResourceRequest&); 258 static bool isStyleResource(const ResourceRequest&);
259 static bool isImageResource(const ResourceRequest&); 259 static bool isImageResource(const ResourceRequest&);
260 static bool isFontResource(const ResourceRequest&); 260 static bool isFontResource(const ResourceRequest&);
261 static bool isMediaResource(const ResourceRequest&); 261 static bool isMediaResource(const ResourceRequest&);
262 262
263 Document* document() const;
264
263 private: 265 private:
264 ContentSecurityPolicy(); 266 ContentSecurityPolicy();
265 267
266 void applyPolicySideEffectsToExecutionContext(); 268 void applyPolicySideEffectsToExecutionContext();
267 269
268 Document* document() const;
269 SecurityOrigin* securityOrigin() const; 270 SecurityOrigin* securityOrigin() const;
270 KURL completeURL(const String&) const; 271 KURL completeURL(const String&) const;
271 272
272 void logToConsole(const String& message, MessageLevel = ErrorMessageLevel); 273 void logToConsole(const String& message, MessageLevel = ErrorMessageLevel);
273 void addPolicyFromHeaderValue(const String&, ContentSecurityPolicyHeaderType , ContentSecurityPolicyHeaderSource); 274 void addPolicyFromHeaderValue(const String&, ContentSecurityPolicyHeaderType , ContentSecurityPolicyHeaderSource);
274 275
275 bool shouldSendViolationReport(const String&) const; 276 bool shouldSendViolationReport(const String&) const;
276 void didSendViolationReport(const String&); 277 void didSendViolationReport(const String&);
277 278
278 RawPtrWillBeMember<ExecutionContext> m_executionContext; 279 RawPtrWillBeMember<ExecutionContext> m_executionContext;
(...skipping 17 matching lines...) Expand all
296 String m_disableEvalErrorMessage; 297 String m_disableEvalErrorMessage;
297 SecurityContext::InsecureRequestsPolicy m_insecureRequestsPolicy; 298 SecurityContext::InsecureRequestsPolicy m_insecureRequestsPolicy;
298 299
299 OwnPtr<CSPSource> m_selfSource; 300 OwnPtr<CSPSource> m_selfSource;
300 String m_selfProtocol; 301 String m_selfProtocol;
301 }; 302 };
302 303
303 } 304 }
304 305
305 #endif 306 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698