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

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

Issue 169303003: CSP 1.1: Revert CSSOM changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase. Created 6 years, 10 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 // These functions are wrong because they assume that there is only one head er. 92 // These functions are wrong because they assume that there is only one head er.
93 // FIXME: Replace them with functions that return vectors. 93 // FIXME: Replace them with functions that return vectors.
94 const String& deprecatedHeader() const; 94 const String& deprecatedHeader() const;
95 HeaderType deprecatedHeaderType() const; 95 HeaderType deprecatedHeaderType() const;
96 96
97 bool allowJavaScriptURLs(const String& contextURL, const WTF::OrdinalNumber& contextLine, ReportingStatus = SendReport) const; 97 bool allowJavaScriptURLs(const String& contextURL, const WTF::OrdinalNumber& contextLine, ReportingStatus = SendReport) const;
98 bool allowInlineEventHandlers(const String& contextURL, const WTF::OrdinalNu mber& contextLine, ReportingStatus = SendReport) const; 98 bool allowInlineEventHandlers(const String& contextURL, const WTF::OrdinalNu mber& contextLine, ReportingStatus = SendReport) const;
99 bool allowInlineScript(const String& contextURL, const WTF::OrdinalNumber& c ontextLine, ReportingStatus = SendReport) const; 99 bool allowInlineScript(const String& contextURL, const WTF::OrdinalNumber& c ontextLine, ReportingStatus = SendReport) const;
100 bool allowInlineStyle(const String& contextURL, const WTF::OrdinalNumber& co ntextLine, ReportingStatus = SendReport) const; 100 bool allowInlineStyle(const String& contextURL, const WTF::OrdinalNumber& co ntextLine, ReportingStatus = SendReport) const;
101 bool allowScriptEval(ScriptState* = 0, ReportingStatus = SendReport) const; 101 bool allowEval(ScriptState* = 0, ReportingStatus = SendReport) const;
102 bool allowStyleEval(ScriptState* = 0, ReportingStatus = SendReport) const;
103 bool allowPluginType(const String& type, const String& typeAttribute, const KURL&, ReportingStatus = SendReport) const; 102 bool allowPluginType(const String& type, const String& typeAttribute, const KURL&, ReportingStatus = SendReport) const;
104 103
105 bool allowScriptFromSource(const KURL&, ReportingStatus = SendReport) const; 104 bool allowScriptFromSource(const KURL&, ReportingStatus = SendReport) const;
106 bool allowObjectFromSource(const KURL&, ReportingStatus = SendReport) const; 105 bool allowObjectFromSource(const KURL&, ReportingStatus = SendReport) const;
107 bool allowChildFrameFromSource(const KURL&, ReportingStatus = SendReport) co nst; 106 bool allowChildFrameFromSource(const KURL&, ReportingStatus = SendReport) co nst;
108 bool allowImageFromSource(const KURL&, ReportingStatus = SendReport) const; 107 bool allowImageFromSource(const KURL&, ReportingStatus = SendReport) const;
109 bool allowStyleFromSource(const KURL&, ReportingStatus = SendReport) const; 108 bool allowStyleFromSource(const KURL&, ReportingStatus = SendReport) const;
110 bool allowFontFromSource(const KURL&, ReportingStatus = SendReport) const; 109 bool allowFontFromSource(const KURL&, ReportingStatus = SendReport) const;
111 bool allowMediaFromSource(const KURL&, ReportingStatus = SendReport) const; 110 bool allowMediaFromSource(const KURL&, ReportingStatus = SendReport) const;
112 bool allowConnectToSource(const KURL&, ReportingStatus = SendReport) const; 111 bool allowConnectToSource(const KURL&, ReportingStatus = SendReport) const;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 void reportMetaOutsideHead(const String&) const; 150 void reportMetaOutsideHead(const String&) const;
152 void reportViolation(const String& directiveText, const String& effectiveDir ective, const String& consoleMessage, const KURL& blockedURL, const Vector<KURL> & reportURIs, const String& header); 151 void reportViolation(const String& directiveText, const String& effectiveDir ective, const String& consoleMessage, const KURL& blockedURL, const Vector<KURL> & reportURIs, const String& header);
153 152
154 void reportBlockedScriptExecutionToInspector(const String& directiveText) co nst; 153 void reportBlockedScriptExecutionToInspector(const String& directiveText) co nst;
155 154
156 const KURL url() const; 155 const KURL url() const;
157 KURL completeURL(const String&) const; 156 KURL completeURL(const String&) const;
158 SecurityOrigin* securityOrigin() const; 157 SecurityOrigin* securityOrigin() const;
159 void enforceSandboxFlags(SandboxFlags) const; 158 void enforceSandboxFlags(SandboxFlags) const;
160 String evalDisabledErrorMessage() const; 159 String evalDisabledErrorMessage() const;
161 String styleEvalDisabledErrorMessage() const;
162 160
163 bool experimentalFeaturesEnabled() const; 161 bool experimentalFeaturesEnabled() const;
164 162
165 static bool shouldBypassMainWorld(ExecutionContext*); 163 static bool shouldBypassMainWorld(ExecutionContext*);
166 164
167 ExecutionContextClient* client() const { return m_client; } 165 ExecutionContextClient* client() const { return m_client; }
168 Document* document() const { return client()->isDocument() ? toDocument(clie nt()) : 0; } 166 Document* document() const { return client()->isDocument() ? toDocument(clie nt()) : 0; }
169 167
170 private: 168 private:
171 explicit ContentSecurityPolicy(ExecutionContextClient*); 169 explicit ContentSecurityPolicy(ExecutionContextClient*);
(...skipping 13 matching lines...) Expand all
185 // We put the hash functions used on the policy object so that we only need 183 // We put the hash functions used on the policy object so that we only need
186 // to calculate a hash once and then distribute it to all of the directives 184 // to calculate a hash once and then distribute it to all of the directives
187 // for validation. 185 // for validation.
188 uint8_t m_scriptHashAlgorithmsUsed; 186 uint8_t m_scriptHashAlgorithmsUsed;
189 uint8_t m_styleHashAlgorithmsUsed; 187 uint8_t m_styleHashAlgorithmsUsed;
190 }; 188 };
191 189
192 } 190 }
193 191
194 #endif 192 #endif
OLDNEW
« no previous file with comments | « Source/core/css/PropertySetCSSStyleDeclaration.cpp ('k') | Source/core/frame/ContentSecurityPolicy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698