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

Side by Side Diff: components/payments/payments_validators.h

Issue 2477883002: [Web Payments] Mojom namespace blink -> payments (Closed)
Patch Set: Fix WebKit tests Created 4 years, 1 month 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
« no previous file with comments | « components/payments/payment_request.mojom ('k') | components/payments/payments_validators.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_PAYMENTS_VALIDATORS_H_ 5 #ifndef COMPONENTS_PAYMENTS_PAYMENTS_VALIDATORS_H_
6 #define COMPONENTS_PAYMENTS_PAYMENTS_VALIDATORS_H_ 6 #define COMPONENTS_PAYMENTS_PAYMENTS_VALIDATORS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "components/payments/payment_request.mojom.h" 10 #include "components/payments/payment_request.mojom.h"
(...skipping 28 matching lines...) Expand all
39 39
40 // Returns true if |code| is a valid ISO 15924 script code. 40 // Returns true if |code| is a valid ISO 15924 script code.
41 static bool isValidScriptCodeFormat(const std::string& code, 41 static bool isValidScriptCodeFormat(const std::string& code,
42 std::string* optionalErrorMessage); 42 std::string* optionalErrorMessage);
43 43
44 // Returns true if the payment address is valid: 44 // Returns true if the payment address is valid:
45 // - Has a valid region code 45 // - Has a valid region code
46 // - Has a valid language code, if any. 46 // - Has a valid language code, if any.
47 // - Has a valid script code, if any. 47 // - Has a valid script code, if any.
48 // A script code should be present only if language code is present. 48 // A script code should be present only if language code is present.
49 static bool isValidShippingAddress(const blink::mojom::PaymentAddressPtr&, 49 static bool isValidShippingAddress(const mojom::PaymentAddressPtr&,
50 std::string* optionalErrorMessage); 50 std::string* optionalErrorMessage);
51 51
52 // Returns false if |error| is too long (greater than 2048). 52 // Returns false if |error| is too long (greater than 2048).
53 static bool isValidErrorMsgFormat(const std::string& code, 53 static bool isValidErrorMsgFormat(const std::string& code,
54 std::string* optionalErrorMessage); 54 std::string* optionalErrorMessage);
55 }; 55 };
56 56
57 } // namespace payments 57 } // namespace payments
58 58
59 #endif // COMPONENTS_PAYMENTS_PAYMENTS_VALIDATORS_H_ 59 #endif // COMPONENTS_PAYMENTS_PAYMENTS_VALIDATORS_H_
OLDNEW
« no previous file with comments | « components/payments/payment_request.mojom ('k') | components/payments/payments_validators.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698