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

Unified Diff: components/payments/content/android/origin_security_checker_android.cc

Issue 2836443002: No rate limit for canMakePayment() on localhost and file://. (Closed)
Patch Set: Comments 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: components/payments/content/android/origin_security_checker_android.cc
diff --git a/components/payments/content/android/origin_security_checker_android.cc b/components/payments/content/android/origin_security_checker_android.cc
index 574859b3a51b0a84f19f57eabb22304bd4d55366..1ca7d1f2a5c808c0eb9bead71b5927f162dbb550 100644
--- a/components/payments/content/android/origin_security_checker_android.cc
+++ b/components/payments/content/android/origin_security_checker_android.cc
@@ -34,6 +34,14 @@ jboolean IsSchemeCryptographic(JNIEnv* env,
GURL(ConvertJavaStringToUTF8(env, jurl)));
}
+// static
+jboolean IsOriginLocalhostOrFile(JNIEnv* env,
+ const JavaParamRef<jclass>& jcaller,
+ const JavaParamRef<jstring>& jurl) {
+ return OriginSecurityChecker::IsOriginLocalhostOrFile(
+ GURL(ConvertJavaStringToUTF8(env, jurl)));
+}
+
bool RegisterOriginSecurityChecker(JNIEnv* env) {
return RegisterNativesImpl(env);
}

Powered by Google App Engine
This is Rietveld 408576698