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

Side by Side Diff: components/payments/content/payment_details_validation.cc

Issue 2811593009: [Payments] move //components/payments/content/*.mojom files to //components/payments/mojom (Closed)
Patch Set: Reland after updating chrome_content_browser_client.cc to fix android build Created 3 years, 8 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 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 #include "components/payments/content/payment_details_validation.h" 5 #include "components/payments/content/payment_details_validation.h"
6 6
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "components/payments/content/payment_request.mojom.h"
11 #include "components/payments/content/payments_validators.h" 10 #include "components/payments/content/payments_validators.h"
11 #include "components/payments/mojom/payment_request.mojom.h"
12 12
13 namespace payments { 13 namespace payments {
14 namespace { 14 namespace {
15 15
16 // Validates ShippingOption or PaymentItem, which happen to have identical 16 // Validates ShippingOption or PaymentItem, which happen to have identical
17 // fields, except for "id", which is present only in ShippingOption. 17 // fields, except for "id", which is present only in ShippingOption.
18 template <typename T> 18 template <typename T>
19 bool validateShippingOptionOrPaymentItem( 19 bool validateShippingOptionOrPaymentItem(
20 const T& item, 20 const T& item,
21 const payments::mojom::PaymentItemPtr& total, 21 const payments::mojom::PaymentItemPtr& total,
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 if (!validatePaymentDetailsModifiers(details->modifiers, details->total, 169 if (!validatePaymentDetailsModifiers(details->modifiers, details->total,
170 error_message)) 170 error_message))
171 return false; 171 return false;
172 } 172 }
173 if (!PaymentsValidators::isValidErrorMsgFormat(details->error, error_message)) 173 if (!PaymentsValidators::isValidErrorMsgFormat(details->error, error_message))
174 return false; 174 return false;
175 return true; 175 return true;
176 } 176 }
177 177
178 } // namespace payments 178 } // namespace payments
OLDNEW
« no previous file with comments | « components/payments/content/payment_details_validation.h ('k') | components/payments/content/payment_manifest_parser.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698