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

Side by Side Diff: Source/core/frame/ContentSecurityPolicy.h

Issue 180273012: Extract CSPDirectiveList from ContentSecurityPolicy. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Ugh. Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google, Inc. All rights reserved. 2 * Copyright (C) 2011 Google, Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 class KURL; 51 class KURL;
52 class ExecutionContextClient; 52 class ExecutionContextClient;
53 class SecurityOrigin; 53 class SecurityOrigin;
54 54
55 typedef int SandboxFlags; 55 typedef int SandboxFlags;
56 typedef Vector<OwnPtr<CSPDirectiveList> > CSPDirectiveListVector; 56 typedef Vector<OwnPtr<CSPDirectiveList> > CSPDirectiveListVector;
57 57
58 class ContentSecurityPolicy { 58 class ContentSecurityPolicy {
59 WTF_MAKE_FAST_ALLOCATED; 59 WTF_MAKE_FAST_ALLOCATED;
60 public: 60 public:
61 // CSP 1.0 Directives
62 static const char ConnectSrc[];
63 static const char DefaultSrc[];
64 static const char FontSrc[];
65 static const char FrameSrc[];
66 static const char ImgSrc[];
67 static const char MediaSrc[];
68 static const char ObjectSrc[];
69 static const char ReportURI[];
70 static const char Sandbox[];
71 static const char ScriptSrc[];
72 static const char StyleSrc[];
73
74 // CSP 1.1 Directives
75 static const char BaseURI[];
76 static const char ChildSrc[];
77 static const char FormAction[];
78 static const char FrameAncestors[];
79 static const char PluginTypes[];
80 static const char ReflectedXSS[];
81 static const char Referrer[];
82
61 static PassOwnPtr<ContentSecurityPolicy> create(ExecutionContextClient* clie nt) 83 static PassOwnPtr<ContentSecurityPolicy> create(ExecutionContextClient* clie nt)
62 { 84 {
63 return adoptPtr(new ContentSecurityPolicy(client)); 85 return adoptPtr(new ContentSecurityPolicy(client));
64 } 86 }
65 ~ContentSecurityPolicy(); 87 ~ContentSecurityPolicy();
66 88
67 void copyStateFrom(const ContentSecurityPolicy*); 89 void copyStateFrom(const ContentSecurityPolicy*);
68 90
69 enum ReportingStatus { 91 enum ReportingStatus {
70 SendReport, 92 SendReport,
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 // We put the hash functions used on the policy object so that we only need 192 // We put the hash functions used on the policy object so that we only need
171 // to calculate a hash once and then distribute it to all of the directives 193 // to calculate a hash once and then distribute it to all of the directives
172 // for validation. 194 // for validation.
173 uint8_t m_scriptHashAlgorithmsUsed; 195 uint8_t m_scriptHashAlgorithmsUsed;
174 uint8_t m_styleHashAlgorithmsUsed; 196 uint8_t m_styleHashAlgorithmsUsed;
175 }; 197 };
176 198
177 } 199 }
178 200
179 #endif 201 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698