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

Side by Side Diff: Source/core/frame/csp/CSPSource.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, 3 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/UseCounter.h ('k') | Source/core/frame/csp/CSPSourceList.h » ('j') | 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 CSPSource_h 5 #ifndef CSPSource_h
6 #define CSPSource_h 6 #define CSPSource_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/frame/csp/ContentSecurityPolicy.h" 9 #include "core/frame/csp/ContentSecurityPolicy.h"
10 #include "wtf/FastAllocBase.h"
10 #include "wtf/text/WTFString.h" 11 #include "wtf/text/WTFString.h"
11 12
12 namespace blink { 13 namespace blink {
13 14
14 class ContentSecurityPolicy; 15 class ContentSecurityPolicy;
15 class KURL; 16 class KURL;
16 17
17 class CORE_EXPORT CSPSource { 18 class CORE_EXPORT CSPSource {
19 WTF_MAKE_FAST_ALLOCATED(CSPSource);
18 public: 20 public:
19 enum WildcardDisposition { 21 enum WildcardDisposition {
20 HasWildcard, 22 HasWildcard,
21 NoWildcard 23 NoWildcard
22 }; 24 };
23 25
24 CSPSource(ContentSecurityPolicy*, const String& scheme, const String& host, int port, const String& path, WildcardDisposition hostWildcard, WildcardDisposit ion portWildcard); 26 CSPSource(ContentSecurityPolicy*, const String& scheme, const String& host, int port, const String& path, WildcardDisposition hostWildcard, WildcardDisposit ion portWildcard);
25 bool matches(const KURL&, ContentSecurityPolicy::RedirectStatus = ContentSec urityPolicy::DidNotRedirect) const; 27 bool matches(const KURL&, ContentSecurityPolicy::RedirectStatus = ContentSec urityPolicy::DidNotRedirect) const;
26 28
27 private: 29 private:
28 bool schemeMatches(const KURL&) const; 30 bool schemeMatches(const KURL&) const;
29 bool hostMatches(const KURL&) const; 31 bool hostMatches(const KURL&) const;
30 bool pathMatches(const KURL&) const; 32 bool pathMatches(const KURL&) const;
31 bool portMatches(const KURL&) const; 33 bool portMatches(const KURL&) const;
32 bool isSchemeOnly() const; 34 bool isSchemeOnly() const;
33 35
34 ContentSecurityPolicy* m_policy; 36 ContentSecurityPolicy* m_policy;
35 String m_scheme; 37 String m_scheme;
36 String m_host; 38 String m_host;
37 int m_port; 39 int m_port;
38 String m_path; 40 String m_path;
39 41
40 WildcardDisposition m_hostWildcard; 42 WildcardDisposition m_hostWildcard;
41 WildcardDisposition m_portWildcard; 43 WildcardDisposition m_portWildcard;
42 }; 44 };
43 45
44 } // namespace 46 } // namespace
45 47
46 #endif 48 #endif
OLDNEW
« no previous file with comments | « Source/core/frame/UseCounter.h ('k') | Source/core/frame/csp/CSPSourceList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698