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 |