| Index: components/payments/content/android/java/src/org/chromium/components/payments/OriginSecurityChecker.java
|
| diff --git a/components/payments/content/android/java/src/org/chromium/components/payments/OriginSecurityChecker.java b/components/payments/content/android/java/src/org/chromium/components/payments/OriginSecurityChecker.java
|
| index 7896be16d758b744b0d989045ac116bcdb3743aa..5ec3c98625d37ffc6efe89707d655b94bb2effd5 100644
|
| --- a/components/payments/content/android/java/src/org/chromium/components/payments/OriginSecurityChecker.java
|
| +++ b/components/payments/content/android/java/src/org/chromium/components/payments/OriginSecurityChecker.java
|
| @@ -10,8 +10,8 @@ import org.chromium.base.annotations.JNINamespace;
|
| @JNINamespace("payments")
|
| public class OriginSecurityChecker {
|
| /**
|
| - * Returns true for a valid URL from a secure origin, e.g., http://localhost, file://test.html,
|
| - * https://bobpay.com.
|
| + * Returns true for a valid URL from a secure origin, e.g., http://localhost,
|
| + * file:///home/user/test.html, https://bobpay.com.
|
| *
|
| * @param url The URL to check.
|
| * @return Whether the origin of the URL is secure.
|
| @@ -30,8 +30,20 @@ public class OriginSecurityChecker {
|
| return nativeIsSchemeCryptographic(url);
|
| }
|
|
|
| + /**
|
| + * Returns true for a valid URL with localhost or file:// scheme origin, e.g., http://localhost,
|
| + * file:///home/user/test.html.
|
| + *
|
| + * @param url The URL to check.
|
| + * @return Whether the URL is localhost or file:// scheme origin.
|
| + */
|
| + public static boolean isOriginLocalhostOrFile(String url) {
|
| + return nativeIsOriginLocalhostOrFile(url);
|
| + }
|
| +
|
| private OriginSecurityChecker() {}
|
|
|
| private static native boolean nativeIsOriginSecure(String url);
|
| private static native boolean nativeIsSchemeCryptographic(String url);
|
| + private static native boolean nativeIsOriginLocalhostOrFile(String url);
|
| }
|
|
|