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

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

Issue 1641533006: CSP: Add an experimental 'unsafe-dynamic' source expression. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Experiment. Created 4 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 // 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 SourceListDirective_h 5 #ifndef SourceListDirective_h
6 #define SourceListDirective_h 6 #define SourceListDirective_h
7 7
8 #include "core/frame/csp/CSPDirective.h" 8 #include "core/frame/csp/CSPDirective.h"
9 #include "core/frame/csp/CSPSourceList.h" 9 #include "core/frame/csp/CSPSourceList.h"
10 #include "core/frame/csp/ContentSecurityPolicy.h" 10 #include "core/frame/csp/ContentSecurityPolicy.h"
11 #include "platform/network/ContentSecurityPolicyParsers.h" 11 #include "platform/network/ContentSecurityPolicyParsers.h"
12 #include "wtf/HashSet.h" 12 #include "wtf/HashSet.h"
13 #include "wtf/text/WTFString.h" 13 #include "wtf/text/WTFString.h"
14 14
15 namespace blink { 15 namespace blink {
16 16
17 class ContentSecurityPolicy; 17 class ContentSecurityPolicy;
18 class KURL; 18 class KURL;
19 19
20 class SourceListDirective final : public CSPDirective { 20 class SourceListDirective final : public CSPDirective {
21 WTF_MAKE_NONCOPYABLE(SourceListDirective); 21 WTF_MAKE_NONCOPYABLE(SourceListDirective);
22 public: 22 public:
23 SourceListDirective(const String& name, const String& value, ContentSecurity Policy*); 23 SourceListDirective(const String& name, const String& value, ContentSecurity Policy*);
24 24
25 bool allows(const KURL&, blink::ContentSecurityPolicy::RedirectStatus) const ; 25 bool allows(const KURL&, blink::ContentSecurityPolicy::RedirectStatus) const ;
26 bool allowInline() const; 26 bool allowInline() const;
27 bool allowEval() const; 27 bool allowEval() const;
28 bool allowDynamic() const;
28 bool allowNonce(const String& nonce) const; 29 bool allowNonce(const String& nonce) const;
29 bool allowHash(const CSPHashValue&) const; 30 bool allowHash(const CSPHashValue&) const;
30 bool isHashOrNoncePresent() const; 31 bool isHashOrNoncePresent() const;
31 uint8_t hashAlgorithmsUsed() const; 32 uint8_t hashAlgorithmsUsed() const;
32 33
33 private: 34 private:
34 CSPSourceList m_sourceList; 35 CSPSourceList m_sourceList;
35 }; 36 };
36 37
37 } // namespace blink 38 } // namespace blink
38 39
39 #endif 40 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698