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

Side by Side Diff: content/common/content_security_policy/csp_directive.h

Issue 2612793002: Implement ContentSecurityPolicy on the browser-side. (Closed)
Patch Set: Temporary re-add the parser + transmit parsed CSP over IPC. Created 3 years, 11 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_COMMON_CONTENT_SECURITY_POLICY_CSP_DIRECTIVE
6 #define CONTENT_COMMON_CONTENT_SECURITY_POLICY_CSP_DIRECTIVE
7
8 #include <string>
9 #include "content/common/content_export.h"
10 #include "content/common/content_security_policy/csp_source_list.h"
11
12 namespace content {
13
14 struct CONTENT_EXPORT CSPDirective {
15 enum Name {
16 DefaultSrc,
17 FrameAncestors,
18 ChildSrc,
19 FrameSrc,
20 FormAction,
21
22 ReportURI,
23
24 Unknown,
25 NAME_LAST = Unknown
26 };
27
28 static std::string NameToString(Name name);
29 static Name StringToName(const std::string& name);
30
31 CSPDirective();
32 CSPDirective(Name name, const CSPSourceList& source_list);
33 CSPDirective(const CSPDirective&);
34
35 Name name;
36 CSPSourceList source_list;
37
38 std::string ToString() const;
39 };
40
41 } // namespace content
42 #endif // CONTENT_COMMON_CONTENT_SECURITY_POLICY_CSP_DIRECTIVE
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698