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

Unified Diff: third_party/WebKit/Source/modules/payments/PaymentRequest.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/modules/payments/PaymentRequest.cpp
diff --git a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
index 526f74e012afc41f47604f1cb3a1970a470def45..c0de6d55b8f18b0621e3bc6e8d67a6b2f2d3889e 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
@@ -6,7 +6,7 @@
#include <stddef.h>
#include <utility>
-#include "bindings/core/v8/ConditionalFeatures.h"
+#include "bindings/core/v8/ConditionalFeaturesForCore.h"
#include "bindings/core/v8/ExceptionState.h"
#include "bindings/core/v8/ScriptPromiseResolver.h"
#include "bindings/core/v8/ScriptState.h"
@@ -598,8 +598,7 @@ bool allowedToUsePaymentRequest(const Frame* frame) {
// 1. If FP, by itself, enables paymentrequest in this document, then
// paymentrequest is allowed.
- if (frame->securityContext()->getFeaturePolicy()->isFeatureEnabled(
- kPaymentFeature)) {
+ if (isFeatureEnabledInFrame(WebFeaturePolicyFeature::Payment, frame)) {
return true;
}

Powered by Google App Engine
This is Rietveld 408576698