Chromium Code Reviews| OLD | NEW |
|---|---|
| (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_BROWSER_FRAME_HOST_CSP_CONTEXT_IMPL_H_ | |
| 6 #define CONTENT_BROWSER_FRAME_HOST_CSP_CONTEXT_IMPL_H_ | |
| 7 | |
| 8 #include "content/common/content_security_policy/csp_context.h" | |
| 9 | |
| 10 namespace content { | |
| 11 | |
| 12 class RenderFrameHostImpl; | |
| 13 | |
| 14 // The CSPContext class represents the system on which the CSP are enforced. | |
|
alexmos
2017/02/24 06:40:27
nit: s/are/is/
arthursonzogni
2017/02/24 16:13:29
Acknowledged. (File removed)
| |
| 15 // The CSPContextImpl is an implementation of it on the browser process. | |
| 16 // It defines: - how to send a CSP violation report. | |
| 17 // - how to log a console error message. | |
| 18 // - what are the schemes that bypass the CSP checks. | |
| 19 class CSPContextImpl : public CSPContext { | |
| 20 public: | |
| 21 CSPContextImpl(RenderFrameHostImpl* render_frame); | |
|
alexmos
2017/02/24 06:40:27
nit: explicit
arthursonzogni
2017/02/24 16:13:29
Acknowledged. (File removed)
| |
| 22 void LogToConsole(const std::string& message) override; | |
| 23 | |
| 24 // Inform the renderer process that a navigation has been blocked by a content | |
| 25 // security policy. | |
| 26 void ReportViolation(const CSPViolationParams& violation_params) override; | |
| 27 | |
| 28 private: | |
| 29 bool SchemeShouldBypassCSP(const base::StringPiece& scheme) override; | |
| 30 | |
| 31 // Never nullptr; | |
| 32 RenderFrameHostImpl* render_frame_; | |
| 33 }; | |
| 34 | |
| 35 } // namespace content | |
| 36 | |
| 37 #endif // CONTENT_BROWSER_FRAME_HOST_CSP_CONTEXT_IMPL_H_ */ | |
| OLD | NEW |