Index: content/browser/frame_host/csp_context_impl.h |
diff --git a/content/browser/frame_host/csp_context_impl.h b/content/browser/frame_host/csp_context_impl.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..46020a46a3697b9ea27cf4ef2e6871352cb1e4e6 |
--- /dev/null |
+++ b/content/browser/frame_host/csp_context_impl.h |
@@ -0,0 +1,32 @@ |
+// 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_BROWSER_FRAME_HOST_CSP_CONTEXT_IMPL_H_ |
+#define CONTENT_BROWSER_FRAME_HOST_CSP_CONTEXT_IMPL_H_ |
+ |
+#include "content/common/content_security_policy/csp_context.h" |
+ |
+namespace content { |
+ |
+class FrameTreeNode; |
+ |
+class CSPContextImpl : public CSPContext { |
+ public: |
+ CSPContextImpl(FrameTreeNode* frame_tree_node); |
+ void LogToConsole(const std::string& message) override; |
+ |
+ // Inform the renderer process that a navigation has been blocked by a content |
+ // security policy. |
+ void ReportViolation(const CSPViolationParams& violation_params) override; |
+ |
+ private: |
+ bool SchemeShouldBypassCSP(const base::StringPiece& scheme) override; |
+ |
+ // Never nullptr; |
+ FrameTreeNode* frame_tree_node_; |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_BROWSER_FRAME_HOST_CSP_CONTEXT_IMPL_H_ */ |