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

Unified Diff: third_party/WebKit/Source/core/loader/FrameLoader.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/core/loader/FrameLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/FrameLoader.cpp b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
index 106c4f26e566f077b9d9832b1beb426dc3fb2e7a..fd017be42e7186d157d101ba9230fec872fd4ad1 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -584,7 +584,7 @@ void FrameLoader::didBeginDocument() {
m_frame->document(),
m_documentLoader->response().httpHeaderField(HTTPNames::Origin_Trial));
if (RuntimeEnabledFeatures::featurePolicyEnabled()) {
- FeaturePolicy* parentFeaturePolicy =
+ WebFeaturePolicy* parentFeaturePolicy =
(isLoadingMainFrame() ? nullptr
: m_frame->client()
->parent()
@@ -598,8 +598,8 @@ void FrameLoader::didBeginDocument() {
FeaturePolicy::parseFeaturePolicy(
featurePolicyHeader,
m_frame->securityContext()->getSecurityOrigin(), &messages);
- m_frame->securityContext()->setFeaturePolicyFromHeader(
- parsedHeader, parentFeaturePolicy);
+ m_frame->securityContext()->initializeFeaturePolicy(parsedHeader,
+ parentFeaturePolicy);
for (auto& message : messages) {
m_frame->document()->addConsoleMessage(ConsoleMessage::create(
OtherMessageSource, ErrorMessageLevel,

Powered by Google App Engine
This is Rietveld 408576698