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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestFactory.java

Issue 2603823002: Prohibit web payments on sites with bad SSL certificates (Closed)
Patch Set: Created 3 years, 11 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: chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestFactory.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestFactory.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestFactory.java
index bdaedc9fffeb9d0889d0eacbfa4afb8bf71771ed..3d5a5f5cf3947eae54292d4609e5673a77917a3c 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestFactory.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestFactory.java
@@ -87,6 +87,8 @@ public class PaymentRequestFactory implements InterfaceFactory<PaymentRequest> {
if (mWebContents == null) return new InvalidPaymentRequest();
+ if (!mWebContents.isContextSecure()) return new InvalidPaymentRequest();
+
ContentViewCore contentViewCore = ContentViewCore.fromWebContents(mWebContents);
if (contentViewCore == null) return new InvalidPaymentRequest();

Powered by Google App Engine
This is Rietveld 408576698