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

Unified Diff: content/common/feature_policy/feature_policy.h

Issue 2655023004: Feature policy: Add basic algorithm for supporting frame policies. (Closed)
Patch Set: Add frame policy to content-side code as well Created 3 years, 10 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/common/feature_policy/feature_policy.h
diff --git a/content/common/feature_policy/feature_policy.h b/content/common/feature_policy/feature_policy.h
index 44f9e11f2667a5f59dad7b5652fd8e4257ed0511..b470dcf9a0dd397a9c37988ed8880bab40f42eac 100644
--- a/content/common/feature_policy/feature_policy.h
+++ b/content/common/feature_policy/feature_policy.h
@@ -159,6 +159,7 @@ class CONTENT_EXPORT FeaturePolicy {
static std::unique_ptr<FeaturePolicy> CreateFromParentPolicy(
const FeaturePolicy* parent_policy,
+ const ParsedFeaturePolicyHeader* frame_policy,
raymes 2017/02/20 02:20:17 nit: it's a bit weird that we pass a ParsedFeature
iclelland 2017/02/21 19:51:05 I've started using the term 'container policy' in
const url::Origin& origin);
// Returns whether or not the given feature is enabled by this policy.
@@ -180,9 +181,15 @@ class CONTENT_EXPORT FeaturePolicy {
FeaturePolicy(url::Origin origin, const FeatureList& feature_list);
static std::unique_ptr<FeaturePolicy> CreateFromParentPolicy(
const FeaturePolicy* parent_policy,
+ const ParsedFeaturePolicyHeader* frame_policy,
const url::Origin& origin,
const FeatureList& features);
+ // Updates the inherited policy with the declarations from the iframe allow*
+ // attributes.
+ void AddFramePolicy(const FeaturePolicy* parent_policy,
+ const ParsedFeaturePolicyHeader* frame_policy);
+
// Returns the list of features which can be controlled by Feature Policy.
static const FeatureList& GetDefaultFeatureList();

Powered by Google App Engine
This is Rietveld 408576698