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

Unified Diff: content/browser/frame_host/render_frame_proxy_host.h

Issue 2190183002: Forward CSP violation reporting from RenderFrameProxy to RenderFrameImpl. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sanitize report endpoints from IPC against actual CSP contents. Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/render_frame_proxy_host.h
diff --git a/content/browser/frame_host/render_frame_proxy_host.h b/content/browser/frame_host/render_frame_proxy_host.h
index 8b123da3b34fd98665377cb59150f286bd7cc8b1..2f828ffccd829569f8be48c8e5162809bd3187e4 100644
--- a/content/browser/frame_host/render_frame_proxy_host.h
+++ b/content/browser/frame_host/render_frame_proxy_host.h
@@ -18,6 +18,10 @@
struct FrameHostMsg_OpenURL_Params;
struct FrameMsg_PostMessage_Params;
+namespace url {
+class Origin;
+} // namespace url
+
namespace content {
class CrossProcessFrameConnector;
@@ -26,6 +30,7 @@ class RenderProcessHost;
class RenderFrameHostImpl;
class RenderViewHostImpl;
class RenderWidgetHostView;
+struct ContentSecurityPolicyViolation;
// When a page's frames are rendered by multiple processes, each renderer has a
// full copy of the frame tree. It has full RenderFrames for the frames it is
@@ -119,11 +124,22 @@ class RenderFrameProxyHost
// IPC Message handlers.
void OnDetach();
void OnOpenURL(const FrameHostMsg_OpenURL_Params& params);
+ void OnForwardContentSecurityPolicyViolation(
+ const url::Origin& origin_declaring_violated_csp,
+ const ContentSecurityPolicyViolation& violation);
void OnRouteMessageEvent(const FrameMsg_PostMessage_Params& params);
void OnDidChangeOpener(int32_t opener_routing_id);
void OnAdvanceFocus(blink::WebFocusType type, int32_t source_routing_id);
void OnFrameFocused();
+ // Helper for figuring out if it is okay to process
+ // FrameHostMsg_ForwardContentSecurityPolicyViolation message.
+ // Note that this function is not 100% accurate - please see a comment in
+ // OnForwardContentSecurityPolicyViolation for more details.
+ bool CanForwardViolationToCurrentDocument(
+ const url::Origin& origin_declaring_violated_csp,
+ const std::string& violated_csp_header);
+
// This RenderFrameProxyHost's routing id.
int routing_id_;
« no previous file with comments | « content/browser/frame_host/frame_tree_node.cc ('k') | content/browser/frame_host/render_frame_proxy_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698