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

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

Issue 1315783003: Make classes and structures in core/frame fast-allocated. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « Source/core/frame/csp/CSPSource.h ('k') | no next file » | 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 CSPSourceList_h 5 #ifndef CSPSourceList_h
6 #define CSPSourceList_h 6 #define CSPSourceList_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/frame/csp/CSPSource.h" 9 #include "core/frame/csp/CSPSource.h"
10 #include "platform/Crypto.h" 10 #include "platform/Crypto.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 CORE_EXPORT CSPSourceList { 20 class CORE_EXPORT CSPSourceList {
21 DISALLOW_ALLOCATION();
21 WTF_MAKE_NONCOPYABLE(CSPSourceList); 22 WTF_MAKE_NONCOPYABLE(CSPSourceList);
22 public: 23 public:
23 CSPSourceList(ContentSecurityPolicy*, const String& directiveName); 24 CSPSourceList(ContentSecurityPolicy*, const String& directiveName);
24 25
25 void parse(const UChar* begin, const UChar* end); 26 void parse(const UChar* begin, const UChar* end);
26 27
27 bool matches(const KURL&, ContentSecurityPolicy::RedirectStatus = ContentSec urityPolicy::DidNotRedirect) const; 28 bool matches(const KURL&, ContentSecurityPolicy::RedirectStatus = ContentSec urityPolicy::DidNotRedirect) const;
28 bool allowInline() const; 29 bool allowInline() const;
29 bool allowEval() const; 30 bool allowEval() const;
30 bool allowNonce(const String&) const; 31 bool allowNonce(const String&) const;
(...skipping 27 matching lines...) Expand all
58 bool m_allowEval; 59 bool m_allowEval;
59 HashSet<String> m_nonces; 60 HashSet<String> m_nonces;
60 HashSet<CSPHashValue> m_hashes; 61 HashSet<CSPHashValue> m_hashes;
61 uint8_t m_hashAlgorithmsUsed; 62 uint8_t m_hashAlgorithmsUsed;
62 }; 63 };
63 64
64 65
65 } // namespace blink 66 } // namespace blink
66 67
67 #endif 68 #endif
OLDNEW
« no previous file with comments | « Source/core/frame/csp/CSPSource.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698