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

Side by Side Diff: components/payments/content/origin_security_checker.h

Issue 2836443002: No rate limit for canMakePayment() on localhost and file://. (Closed)
Patch Set: Comments Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_PAYMENTS_CONTENT_ORIGIN_SECURITY_CHECKER_H_ 5 #ifndef COMPONENTS_PAYMENTS_CONTENT_ORIGIN_SECURITY_CHECKER_H_
6 #define COMPONENTS_PAYMENTS_CONTENT_ORIGIN_SECURITY_CHECKER_H_ 6 #define COMPONENTS_PAYMENTS_CONTENT_ORIGIN_SECURITY_CHECKER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 9
10 class GURL; 10 class GURL;
11 11
12 namespace payments { 12 namespace payments {
13 13
14 class OriginSecurityChecker { 14 class OriginSecurityChecker {
15 public: 15 public:
16 // Returns true for a valid |url| from a secure origin. 16 // Returns true for a valid |url| from a secure origin.
17 static bool IsOriginSecure(const GURL& url); 17 static bool IsOriginSecure(const GURL& url);
18 18
19 // Returns true for a valid |url| with a cryptographic scheme, e.g., HTTPS, 19 // Returns true for a valid |url| with a cryptographic scheme, e.g., HTTPS,
20 // HTTPS-SO, WSS. 20 // HTTPS-SO, WSS.
21 static bool IsSchemeCryptographic(const GURL& url); 21 static bool IsSchemeCryptographic(const GURL& url);
22 22
23 // Returns true for a valid |url| with localhost or file:// scheme origin.
24 static bool IsOriginLocalhostOrFile(const GURL& url);
25
23 private: 26 private:
24 DISALLOW_IMPLICIT_CONSTRUCTORS(OriginSecurityChecker); 27 DISALLOW_IMPLICIT_CONSTRUCTORS(OriginSecurityChecker);
25 }; 28 };
26 29
27 } // namespace payments 30 } // namespace payments
28 31
29 #endif // COMPONENTS_PAYMENTS_CONTENT_ORIGIN_SECURITY_CHECKER_H_ 32 #endif // COMPONENTS_PAYMENTS_CONTENT_ORIGIN_SECURITY_CHECKER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698