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

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

Issue 2651883008: Make content::FeaturePolicy implement WebFeaturePolicy, and use it in blink code (Closed)
Patch Set: Duplicate FP object rather than modifying in-place 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: 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 3fcba5514d4016c656052ed1c962fa0d90d7a9cf..599232616effa39d25e4cb812884e8d9683d13a3 100644
--- a/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp
+++ b/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp
@@ -15,6 +15,7 @@
#include "core/layout/LayoutObject.h"
#include "core/page/Page.h"
#include "platform/heap/Handle.h"
+#include "public/platform/WebFeaturePolicy.h"
#include "public/platform/WebFloatRect.h"
#include "public/platform/WebRect.h"
#include "public/web/WebDocument.h"
@@ -431,13 +432,13 @@ void WebRemoteFrameImpl::setReplicatedName(const WebString& name,
void WebRemoteFrameImpl::setReplicatedFeaturePolicyHeader(
const WebParsedFeaturePolicyHeader& parsedHeader) const {
if (RuntimeEnabledFeatures::featurePolicyEnabled()) {
- FeaturePolicy* parentFeaturePolicy = nullptr;
+ WebFeaturePolicy* parentFeaturePolicy = nullptr;
if (parent()) {
Frame* parentFrame = frame()->client()->parent();
parentFeaturePolicy = parentFrame->securityContext()->getFeaturePolicy();
}
- frame()->securityContext()->setFeaturePolicyFromHeader(parsedHeader,
- parentFeaturePolicy);
+ frame()->securityContext()->initializeFeaturePolicy(parsedHeader,
haraken 2017/03/04 07:36:01 Also we can make initializeFeaturePolicy a method
+ parentFeaturePolicy);
}
}

Powered by Google App Engine
This is Rietveld 408576698