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

Unified Diff: chrome/browser/payments/android/ssl_validity_checker_android.cc

Issue 2815763002: Prevent usage of web payments API over insecure HTTPS. (Closed)
Patch Set: Fix typo 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: chrome/browser/payments/android/ssl_validity_checker_android.cc
diff --git a/chrome/browser/payments/android/ssl_validity_checker_android.cc b/chrome/browser/payments/android/ssl_validity_checker_android.cc
new file mode 100644
index 0000000000000000000000000000000000000000..1d7658dd0cf581958ba42b1fb3c08a76b988862a
--- /dev/null
+++ b/chrome/browser/payments/android/ssl_validity_checker_android.cc
@@ -0,0 +1,27 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/payments/android/ssl_validity_checker_android.h"
+
+#include "base/android/scoped_java_ref.h"
+#include "chrome/browser/payments/ssl_validity_checker.h"
+#include "content/public/browser/web_contents.h"
+#include "jni/SslValidityChecker_jni.h"
+
+namespace payments {
+
+// static
+jboolean IsSslCertificateValid(
+ JNIEnv* env,
+ const base::android::JavaParamRef<jclass>& jcaller,
+ const base::android::JavaParamRef<jobject>& jweb_contents) {
+ return SslValidityChecker::IsSslCertificateValid(
+ content::WebContents::FromJavaWebContents(jweb_contents));
+}
+
+bool RegisterSslValidityChecker(JNIEnv* env) {
+ return RegisterNativesImpl(env);
+}
+
+} // namespace payments

Powered by Google App Engine
This is Rietveld 408576698