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..5cede98ca114cd9f025877949892d9c1a9a96c03 |
--- /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::IsOriginSecure(const GURL& url) { |
+ return url.is_valid() && content::IsOriginSecure(url); |
+} |
+ |
+// static |
+bool OriginSecurityChecker::IsSchemeCryptographic(const GURL& url) { |
+ return url.is_valid() && url.SchemeIsCryptographic(); |
+} |
+ |
+} // namespace payments |