| 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
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..26da9abc71b2e518fda755c048524101fda19700
|
| --- /dev/null
|
| +++ b/components/payments/content/origin_security_checker.cc
|
| @@ -0,0 +1,22 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "components/payments/content/origin_security_checker.h"
|
| +
|
| +#include "content/public/common/origin_util.h"
|
| +#include "url/gurl.h"
|
| +
|
| +namespace payments {
|
| +
|
| +// static
|
| +bool OriginSecurityChecker::IsSecureOrigin(const GURL& url) {
|
| + return url.is_valid() && content::IsOriginSecure(url);
|
| +}
|
| +
|
| +// static
|
| +bool OriginSecurityChecker::IsCryptographicScheme(const GURL& url) {
|
| + return url.is_valid() && url.SchemeIsCryptographic();
|
| +}
|
| +
|
| +} // namespace payments
|
|
|