| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/payments/content/android/origin_security_checker_android.h" | 5 #include "components/payments/content/android/origin_security_checker_android.h" |
| 6 | 6 |
| 7 #include "base/android/jni_string.h" | 7 #include "base/android/jni_string.h" |
| 8 #include "base/android/scoped_java_ref.h" | 8 #include "base/android/scoped_java_ref.h" |
| 9 #include "components/payments/content/origin_security_checker.h" | 9 #include "components/payments/content/origin_security_checker.h" |
| 10 #include "content/public/browser/web_contents.h" | 10 #include "content/public/browser/web_contents.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 } | 27 } |
| 28 | 28 |
| 29 // static | 29 // static |
| 30 jboolean IsSchemeCryptographic(JNIEnv* env, | 30 jboolean IsSchemeCryptographic(JNIEnv* env, |
| 31 const JavaParamRef<jclass>& jcaller, | 31 const JavaParamRef<jclass>& jcaller, |
| 32 const JavaParamRef<jstring>& jurl) { | 32 const JavaParamRef<jstring>& jurl) { |
| 33 return OriginSecurityChecker::IsSchemeCryptographic( | 33 return OriginSecurityChecker::IsSchemeCryptographic( |
| 34 GURL(ConvertJavaStringToUTF8(env, jurl))); | 34 GURL(ConvertJavaStringToUTF8(env, jurl))); |
| 35 } | 35 } |
| 36 | 36 |
| 37 // static |
| 38 jboolean IsOriginLocalhostOrFile(JNIEnv* env, |
| 39 const JavaParamRef<jclass>& jcaller, |
| 40 const JavaParamRef<jstring>& jurl) { |
| 41 return OriginSecurityChecker::IsOriginLocalhostOrFile( |
| 42 GURL(ConvertJavaStringToUTF8(env, jurl))); |
| 43 } |
| 44 |
| 37 bool RegisterOriginSecurityChecker(JNIEnv* env) { | 45 bool RegisterOriginSecurityChecker(JNIEnv* env) { |
| 38 return RegisterNativesImpl(env); | 46 return RegisterNativesImpl(env); |
| 39 } | 47 } |
| 40 | 48 |
| 41 } // namespace payments | 49 } // namespace payments |
| OLD | NEW |