| Index: components/payments/content/origin_security_checker.cc
|
| diff --git a/components/payments/content/origin_security_checker.cc b/components/payments/content/origin_security_checker.cc
|
| index 5cede98ca114cd9f025877949892d9c1a9a96c03..20986082d4796c4eeb7d7326ba6f1add2804dea1 100644
|
| --- a/components/payments/content/origin_security_checker.cc
|
| +++ b/components/payments/content/origin_security_checker.cc
|
| @@ -5,6 +5,7 @@
|
| #include "components/payments/content/origin_security_checker.h"
|
|
|
| #include "content/public/common/origin_util.h"
|
| +#include "net/base/url_util.h"
|
| #include "url/gurl.h"
|
|
|
| namespace payments {
|
| @@ -19,4 +20,10 @@ bool OriginSecurityChecker::IsSchemeCryptographic(const GURL& url) {
|
| return url.is_valid() && url.SchemeIsCryptographic();
|
| }
|
|
|
| +// static
|
| +bool OriginSecurityChecker::IsOriginLocalhostOrFile(const GURL& url) {
|
| + return url.is_valid() &&
|
| + (net::IsLocalhost(url.HostNoBrackets()) || url.SchemeIsFile());
|
| +}
|
| +
|
| } // namespace payments
|
|
|