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 3d4c48d24635a6aefc6a53c91757b6bd9543fb01..5a09665034c0e000a219ac73bc38ceee386e3d8b 100644 |
--- a/components/autofill/core/browser/autofill_data_util.cc |
+++ b/components/autofill/core/browser/autofill_data_util.cc |
@@ -400,19 +400,18 @@ bool ProfileMatchesFullName(const base::string16 full_name, |
} |
const PaymentRequestData& GetPaymentRequestData(const std::string& type) { |
- for (size_t i = 0; i < arraysize(kPaymentRequestData); ++i) { |
- if (type == kPaymentRequestData[i].card_type) |
- return kPaymentRequestData[i]; |
+ for (const PaymentRequestData& data : kPaymentRequestData) { |
+ if (type == data.card_type) |
+ return data; |
} |
return kGenericPaymentRequestData; |
} |
const char* GetCardTypeForBasicCardPaymentType( |
const std::string& basic_card_payment_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; |
+ for (const PaymentRequestData& data : kPaymentRequestData) { |
+ if (basic_card_payment_type == data.basic_card_payment_type) { |
+ return data.card_type; |
} |
} |
return kGenericPaymentRequestData.card_type; |