| Index: components/autofill/core/browser/autofill_data_util.cc
|
| diff --git a/components/autofill/core/browser/autofill_data_util.cc b/components/autofill/core/browser/autofill_data_util.cc
|
| index 5a09665034c0e000a219ac73bc38ceee386e3d8b..3d4c48d24635a6aefc6a53c91757b6bd9543fb01 100644
|
| --- a/components/autofill/core/browser/autofill_data_util.cc
|
| +++ b/components/autofill/core/browser/autofill_data_util.cc
|
| @@ -400,18 +400,19 @@
|
| }
|
|
|
| const PaymentRequestData& GetPaymentRequestData(const std::string& type) {
|
| - for (const PaymentRequestData& data : kPaymentRequestData) {
|
| - if (type == data.card_type)
|
| - return data;
|
| + for (size_t i = 0; i < arraysize(kPaymentRequestData); ++i) {
|
| + if (type == kPaymentRequestData[i].card_type)
|
| + return kPaymentRequestData[i];
|
| }
|
| return kGenericPaymentRequestData;
|
| }
|
|
|
| const char* GetCardTypeForBasicCardPaymentType(
|
| const std::string& basic_card_payment_type) {
|
| - for (const PaymentRequestData& data : kPaymentRequestData) {
|
| - if (basic_card_payment_type == data.basic_card_payment_type) {
|
| - return data.card_type;
|
| + for (size_t i = 0; i < arraysize(kPaymentRequestData); ++i) {
|
| + if (basic_card_payment_type ==
|
| + kPaymentRequestData[i].basic_card_payment_type) {
|
| + return kPaymentRequestData[i].card_type;
|
| }
|
| }
|
| return kGenericPaymentRequestData.card_type;
|
|
|