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

Unified Diff: third_party/WebKit/Source/core/dom/SecurityContext.cpp

Issue 2483703002: Replicate feature policy headers to remote frames (Closed)
Patch Set: Addressing review comments Created 4 years, 1 month 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: third_party/WebKit/Source/core/dom/SecurityContext.cpp
diff --git a/third_party/WebKit/Source/core/dom/SecurityContext.cpp b/third_party/WebKit/Source/core/dom/SecurityContext.cpp
index 04e8421cdbd62371c8cb27b46bf2e275b1243f16..4a6c560ea063a533526c0d43ba2c9914f5621d33 100644
--- a/third_party/WebKit/Source/core/dom/SecurityContext.cpp
+++ b/third_party/WebKit/Source/core/dom/SecurityContext.cpp
@@ -99,4 +99,14 @@ void SecurityContext::enforceSuborigin(const Suborigin& suborigin) {
didUpdateSecurityOrigin();
}
+void SecurityContext::setFeaturePolicyFromHeader(
+ const String& headerValue,
+ FeaturePolicy* parentFeaturePolicy,
+ Vector<String>* messages) {
+ DCHECK(!m_featurePolicy);
+ m_featurePolicy = FeaturePolicy::createFromParentPolicy(parentFeaturePolicy,
+ m_securityOrigin);
+ m_featurePolicy->setHeaderPolicy(headerValue, messages);
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698