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

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

Issue 1009583003: Add CSP header for resources with an active policy (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: test tweaks 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
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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 String evalDisabledErrorMessage() const; 215 String evalDisabledErrorMessage() const;
216 216
217 void setInsecureRequestsPolicy(SecurityContext::InsecureRequestsPolicy); 217 void setInsecureRequestsPolicy(SecurityContext::InsecureRequestsPolicy);
218 SecurityContext::InsecureRequestsPolicy insecureRequestsPolicy() const { ret urn m_insecureRequestsPolicy; }; 218 SecurityContext::InsecureRequestsPolicy insecureRequestsPolicy() const { ret urn m_insecureRequestsPolicy; };
219 219
220 bool urlMatchesSelf(const KURL&) const; 220 bool urlMatchesSelf(const KURL&) const;
221 bool protocolMatchesSelf(const KURL&) const; 221 bool protocolMatchesSelf(const KURL&) const;
222 222
223 bool experimentalFeaturesEnabled() const; 223 bool experimentalFeaturesEnabled() const;
224 224
225 bool hasScriptPolicy() const;
226 bool hasStylePolicy() const;
227 bool hasImagePolicy() const;
228 bool hasFontPolicy() const;
229 bool hasMediaPolicy() const;
230 bool hasPluginPolicy() const;
231
225 static bool shouldBypassMainWorld(const ExecutionContext*); 232 static bool shouldBypassMainWorld(const ExecutionContext*);
226 233
227 static bool isDirectiveName(const String&); 234 static bool isDirectiveName(const String&);
228 235
229 private: 236 private:
230 ContentSecurityPolicy(); 237 ContentSecurityPolicy();
231 238
232 void applyPolicySideEffectsToExecutionContext(); 239 void applyPolicySideEffectsToExecutionContext();
233 240
234 Document* document() const; 241 Document* document() const;
(...skipping 26 matching lines...) Expand all
261 String m_disableEvalErrorMessage; 268 String m_disableEvalErrorMessage;
262 SecurityContext::InsecureRequestsPolicy m_insecureRequestsPolicy; 269 SecurityContext::InsecureRequestsPolicy m_insecureRequestsPolicy;
263 270
264 OwnPtr<CSPSource> m_selfSource; 271 OwnPtr<CSPSource> m_selfSource;
265 String m_selfProtocol; 272 String m_selfProtocol;
266 }; 273 };
267 274
268 } 275 }
269 276
270 #endif 277 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698