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

Unified Diff: third_party/WebKit/Source/web/WebFrame.cpp

Issue 2797813002: Replicate feature policy container policies. (Closed)
Patch Set: Addressing review comments Created 3 years, 8 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: third_party/WebKit/Source/web/WebFrame.cpp
diff --git a/third_party/WebKit/Source/web/WebFrame.cpp b/third_party/WebKit/Source/web/WebFrame.cpp
index caf7cdb938cb7bb310fe9839719658ee6e41df3d..29bf0d8c04e50f829b0c326208c3b21c650beb84 100644
--- a/third_party/WebKit/Source/web/WebFrame.cpp
+++ b/third_party/WebKit/Source/web/WebFrame.cpp
@@ -127,12 +127,16 @@ WebSecurityOrigin WebFrame::GetSecurityOrigin() const {
ToImplBase()->GetFrame()->GetSecurityContext()->GetSecurityOrigin());
}
-void WebFrame::SetFrameOwnerSandboxFlags(WebSandboxFlags flags) {
- // At the moment, this is only used to replicate sandbox flags
- // for frames with a remote owner.
- FrameOwner* owner = ToImplBase()->GetFrame()->Owner();
+void WebFrame::SetFrameOwnerPolicy(
+ WebSandboxFlags flags,
+ const blink::WebParsedFeaturePolicy& container_policy) {
+ // At the moment, this is only used to replicate sandbox flags and container
+ // policy for frames with a remote owner.
+ RemoteFrameOwner* owner =
+ ToRemoteFrameOwner(ToImplBase()->GetFrame()->Owner());
DCHECK(owner);
- ToRemoteFrameOwner(owner)->SetSandboxFlags(static_cast<SandboxFlags>(flags));
+ owner->SetSandboxFlags(static_cast<SandboxFlags>(flags));
+ owner->SetContainerPolicy(container_policy);
}
WebInsecureRequestPolicy WebFrame::GetInsecureRequestPolicy() const {
« no previous file with comments | « third_party/WebKit/Source/web/RemoteFrameOwner.cpp ('k') | third_party/WebKit/Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698