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

Side by Side Diff: components/payments/content/android/origin_security_checker_android.cc

Issue 2815763002: Prevent usage of web payments API over insecure HTTPS. (Closed)
Patch Set: Ganggui's comment. 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "components/payments/content/android/origin_security_checker_android.h"
6
7 #include "base/android/jni_string.h"
8 #include "base/android/scoped_java_ref.h"
9 #include "components/payments/content/origin_security_checker.h"
10 #include "content/public/browser/web_contents.h"
11 #include "jni/OriginSecurityChecker_jni.h"
12
13 namespace payments {
14 namespace {
15
16 using ::base::android::JavaParamRef;
17 using ::base::android::ConvertJavaStringToUTF8;
18
19 } // namespace
20
21 // static
22 jboolean IsOriginSecure(JNIEnv* env,
23 const JavaParamRef<jclass>& jcaller,
24 const JavaParamRef<jstring>& jurl) {
25 return OriginSecurityChecker::IsOriginSecure(
26 GURL(ConvertJavaStringToUTF8(env, jurl)));
27 }
28
29 // static
30 jboolean IsSchemeCryptographic(JNIEnv* env,
31 const JavaParamRef<jclass>& jcaller,
32 const JavaParamRef<jstring>& jurl) {
33 return OriginSecurityChecker::IsSchemeCryptographic(
34 GURL(ConvertJavaStringToUTF8(env, jurl)));
35 }
36
37 bool RegisterOriginSecurityChecker(JNIEnv* env) {
38 return RegisterNativesImpl(env);
39 }
40
41 } // namespace payments
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698