| Index: content/common/content_security_policy/csp_directive.h
|
| diff --git a/content/common/content_security_policy/csp_directive.h b/content/common/content_security_policy/csp_directive.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..eb0665c9d191d0d3e706bae64a9fa1a09fa2d826
|
| --- /dev/null
|
| +++ b/content/common/content_security_policy/csp_directive.h
|
| @@ -0,0 +1,42 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CONTENT_COMMON_CONTENT_SECURITY_POLICY_CSP_DIRECTIVE
|
| +#define CONTENT_COMMON_CONTENT_SECURITY_POLICY_CSP_DIRECTIVE
|
| +
|
| +#include <string>
|
| +#include "content/common/content_export.h"
|
| +#include "content/common/content_security_policy/csp_source_list.h"
|
| +
|
| +namespace content {
|
| +
|
| +struct CONTENT_EXPORT CSPDirective {
|
| + enum Name {
|
| + DefaultSrc,
|
| + FrameAncestors,
|
| + ChildSrc,
|
| + FrameSrc,
|
| + FormAction,
|
| +
|
| + ReportURI,
|
| +
|
| + Unknown,
|
| + NAME_LAST = Unknown
|
| + };
|
| +
|
| + static std::string NameToString(Name name);
|
| + static Name StringToName(const std::string& name);
|
| +
|
| + CSPDirective();
|
| + CSPDirective(Name name, const CSPSourceList& source_list);
|
| + CSPDirective(const CSPDirective&);
|
| +
|
| + Name name;
|
| + CSPSourceList source_list;
|
| +
|
| + std::string ToString() const;
|
| +};
|
| +
|
| +} // namespace content
|
| +#endif // CONTENT_COMMON_CONTENT_SECURITY_POLICY_CSP_DIRECTIVE
|
|
|