Chromium Code Reviews| Index: components/payments/payment_details_validation.cc |
| diff --git a/components/payments/payment_details_validation.cc b/components/payments/payment_details_validation.cc |
| index 08a6fa3dd433f0f8cf3ccb78bc56df90c0f05414..a01303e904cea9bb89f2005d2865de3bf7a3ed24 100644 |
| --- a/components/payments/payment_details_validation.cc |
| +++ b/components/payments/payment_details_validation.cc |
| @@ -108,19 +108,15 @@ bool validatePaymentDetailsModifiers( |
| return false; |
| } |
| - std::set<mojo::String> uniqueMethods; |
| for (const auto& modifier : modifiers) { |
| - if (modifier->supported_methods.empty()) { |
| - *error_message = "Must specify at least one payment method identifier"; |
| + if (!modifier->method_data) { |
|
Kevin Bailey
2016/11/29 17:27:59
This looks fine; it just concerns me that the IDL
please use gerrit instead
2016/11/29 19:26:52
Acknowledged.
|
| + *error_message = "Method data required"; |
| return false; |
| } |
| - for (const auto& method : modifier->supported_methods) { |
| - if (uniqueMethods.find(method) != uniqueMethods.end()) { |
| - *error_message = "Duplicate payment method identifiers are not allowed"; |
| - return false; |
| - } |
| - uniqueMethods.insert(method); |
| + if (modifier->method_data->supported_methods.empty()) { |
| + *error_message = "Must specify at least one payment method identifier"; |
| + return false; |
| } |
| if (modifier->total) { |