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

Unified Diff: third_party/WebKit/Source/web/WebRemoteFrameImpl.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
« no previous file with comments | « third_party/WebKit/Source/web/WebRemoteFrameImpl.h ('k') | third_party/WebKit/public/web/WebFrameClient.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp b/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp
index a52e7e3e2a18b7785b5da02dde7a73e02edbd789..eb24bbd9069e701396819bcf62ca8c5c0cf60872 100644
--- a/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp
+++ b/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp
@@ -432,6 +432,19 @@ void WebRemoteFrameImpl::setReplicatedName(const WebString& name,
frame()->tree().setPrecalculatedName(name, uniqueName);
}
+void WebRemoteFrameImpl::setReplicatedFeaturePolicyHeader(
+ const WebString& headerValue) const {
+ if (RuntimeEnabledFeatures::featurePolicyEnabled()) {
+ FeaturePolicy* parentFeaturePolicy = nullptr;
+ if (parent()) {
+ Frame* parentFrame = frame()->client()->parent();
+ parentFeaturePolicy = parentFrame->securityContext()->getFeaturePolicy();
+ }
+ frame()->securityContext()->setFeaturePolicyFromHeader(headerValue,
+ parentFeaturePolicy);
+ }
+}
+
void WebRemoteFrameImpl::addReplicatedContentSecurityPolicyHeader(
const WebString& headerValue,
WebContentSecurityPolicyType type,
« no previous file with comments | « third_party/WebKit/Source/web/WebRemoteFrameImpl.h ('k') | third_party/WebKit/public/web/WebFrameClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698