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

Unified Diff: content/browser/frame_host/frame_tree_node.cc

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
« no previous file with comments | « content/browser/frame_host/frame_tree_node.h ('k') | content/browser/frame_host/render_frame_proxy_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/frame_tree_node.cc
diff --git a/content/browser/frame_host/frame_tree_node.cc b/content/browser/frame_host/frame_tree_node.cc
index 2708a892fadbbfaa71422500ee373b7d8e2fb87e..239a8280038d73f096c53236d20dde19c53999b4 100644
--- a/content/browser/frame_host/frame_tree_node.cc
+++ b/content/browser/frame_host/frame_tree_node.cc
@@ -4,6 +4,7 @@
#include "content/browser/frame_host/frame_tree_node.h"
+#include <algorithm>
#include <queue>
#include <utility>
@@ -249,6 +250,17 @@ void FrameTreeNode::ResetContentSecurityPolicy() {
render_manager_.OnDidResetContentSecurityPolicy();
}
+bool FrameTreeNode::ContainsContentSecurityPolicyHeader(
+ const std::string& header_value_to_find) {
+ return std::any_of(
+ replication_state_.accumulated_csp_headers.begin(),
+ replication_state_.accumulated_csp_headers.end(),
+ [&header_value_to_find](
+ const ContentSecurityPolicyHeader& accumulated_header) {
+ return accumulated_header.header_value == header_value_to_find;
+ });
+}
+
void FrameTreeNode::SetInsecureRequestPolicy(
blink::WebInsecureRequestPolicy policy) {
if (policy == replication_state_.insecure_request_policy)
« no previous file with comments | « content/browser/frame_host/frame_tree_node.h ('k') | content/browser/frame_host/render_frame_proxy_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698