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

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

Issue 2449873004: Removing CSPSourceList level up to SourceListDirective. (Closed)
Patch Set: Exporting CSPDirective Created 4 years, 1 month 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 CSPDirective_h 5 #ifndef CSPDirective_h
6 #define CSPDirective_h 6 #define CSPDirective_h
7 7
8 #include "core/CoreExport.h"
8 #include "platform/heap/Handle.h" 9 #include "platform/heap/Handle.h"
9 #include "wtf/text/WTFString.h" 10 #include "wtf/text/WTFString.h"
10 11
11 namespace blink { 12 namespace blink {
12 13
13 class ContentSecurityPolicy; 14 class ContentSecurityPolicy;
14 15
15 class CSPDirective : public GarbageCollectedFinalized<CSPDirective> { 16 class CORE_EXPORT CSPDirective
17 : public GarbageCollectedFinalized<CSPDirective> {
16 WTF_MAKE_NONCOPYABLE(CSPDirective); 18 WTF_MAKE_NONCOPYABLE(CSPDirective);
17 19
18 public: 20 public:
19 CSPDirective(const String& name, 21 CSPDirective(const String& name,
20 const String& value, 22 const String& value,
21 ContentSecurityPolicy* policy) 23 ContentSecurityPolicy* policy)
22 : m_name(name), m_text(name + ' ' + value), m_policy(policy) {} 24 : m_name(name), m_text(name + ' ' + value), m_policy(policy) {}
23 virtual ~CSPDirective() {} 25 virtual ~CSPDirective() {}
24 DEFINE_INLINE_VIRTUAL_TRACE() { visitor->trace(m_policy); } 26 DEFINE_INLINE_VIRTUAL_TRACE() { visitor->trace(m_policy); }
25 27
26 const String& text() const { return m_text; } 28 const String& text() const { return m_text; }
27 29
28 protected: 30 protected:
29 ContentSecurityPolicy* policy() const { return m_policy; } 31 ContentSecurityPolicy* policy() const { return m_policy; }
30 32
31 private: 33 private:
32 String m_name; 34 String m_name;
33 String m_text; 35 String m_text;
34 Member<ContentSecurityPolicy> m_policy; 36 Member<ContentSecurityPolicy> m_policy;
35 }; 37 };
36 38
37 } // namespace blink 39 } // namespace blink
38 40
39 #endif 41 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698