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

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

Issue 2612793002: Implement ContentSecurityPolicy on the browser-side. (Closed)
Patch Set: Rename SchemeShouldBypass => SchemeShouldBypassCSP. Created 3 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
(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 ChildSrc,
18 FrameSrc,
19 FormAction,
20
21 Unknown,
22 NameLast = Unknown,
23 };
24
25 static std::string NameToString(Name name);
26 static Name StringToName(const std::string& name);
27
28 CSPDirective();
29 CSPDirective(Name name, const CSPSourceList& source_list);
30 CSPDirective(const CSPDirective&);
31
32 Name name;
33 CSPSourceList source_list;
34
35 std::string ToString() const;
36 };
37
38 } // namespace content
39 #endif // CONTENT_COMMON_CONTENT_SECURITY_POLICY_CSP_DIRECTIVE_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698