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

Unified Diff: content/common/frame_replication_state.h

Issue 2520223002: Replicate a parsed feature policy representation so it doesn't need to be parsed in the browser pro… (Closed)
Patch Set: Replicate a parsed feature policy representation so it doesn't need to be parsed in the browser pro… Created 4 years 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/common/frame_messages.h ('k') | content/common/frame_replication_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/frame_replication_state.h
diff --git a/content/common/frame_replication_state.h b/content/common/frame_replication_state.h
index cc8d4780d30615511950eba6ba1b31482c13bbea..291287f64628f9d41099727f02f1662834b20551 100644
--- a/content/common/frame_replication_state.h
+++ b/content/common/frame_replication_state.h
@@ -20,6 +20,21 @@ enum class WebSandboxFlags;
namespace content {
+// This struct holds feature policy whitelist data that needs to be replicated
+// between a RenderFrame and any of its associated RenderFrameProxies. A list of
+// these form part of the FrameReplicationState below (one entry per feature).
+struct CONTENT_EXPORT FeaturePolicyParsedWhitelist {
+ FeaturePolicyParsedWhitelist();
+ FeaturePolicyParsedWhitelist(const FeaturePolicyParsedWhitelist& fppw);
+ ~FeaturePolicyParsedWhitelist();
+
+ std::string feature_name;
+ bool matches_all_origins;
+ std::vector<url::Origin> origins;
+};
+
+using ParsedFeaturePolicy = std::vector<FeaturePolicyParsedWhitelist>;
+
// This structure holds information that needs to be replicated between a
// RenderFrame and any of its associated RenderFrameProxies.
struct CONTENT_EXPORT FrameReplicationState {
@@ -84,9 +99,9 @@ struct CONTENT_EXPORT FrameReplicationState {
// scratch.
std::string unique_name;
- // Feature policy header. May be empty if no header was sent with the
+ // Parsed feature policy header. May be empty if no header was sent with the
// document.
- std::string feature_policy_header;
+ ParsedFeaturePolicy feature_policy_header;
// Accumulated CSP headers - gathered from http headers, <meta> elements,
// parent frames (in case of about:blank frames).
« no previous file with comments | « content/common/frame_messages.h ('k') | content/common/frame_replication_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698