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

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

Issue 2373103002: [Web Payments] Common Payments validation (Closed)
Patch Set: Split off moving Mojo file 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_PAYMENTS_PAYMENT_DETAILS_VALIDATION_H_
6 #define COMPONENTS_PAYMENTS_PAYMENT_DETAILS_VALIDATION_H_
7
8 #include <string>
9
10 #include "components/payments/payment_request.mojom.h"
11
12 namespace payments {
13
14 struct ExceptionState {
15 public:
16 void throwTypeError(const std::string& msg) { msg_ = msg; }
17
18 bool hadException() { return msg_.size() > 0; }
19
20 const std::string& message() { return msg_; }
21
22 private:
23 std::string msg_;
24 };
25
26 void validatePaymentDetails(const blink::mojom::PaymentDetailsPtr& details,
27 ExceptionState* state);
28 bool validatePaymentDetails(const blink::mojom::PaymentDetailsPtr& details);
please use gerrit instead 2016/10/27 17:14:25 Instead of recreating the ExceptionState concept f
Kevin Bailey 2016/10/27 22:17:53 Done.
29
30 } // namespace payments
31
32 #endif // COMPONENTS_PAYMENTS_PAYMENT_DETAILS_VALIDATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698