Chromium Code Reviews| Index: components/autofill/core/browser/credit_card.cc |
| diff --git a/components/autofill/core/browser/credit_card.cc b/components/autofill/core/browser/credit_card.cc |
| index 3b402eae9e873dbb85ae52383d1ebaa1a1e4d2bd..e313b325a2038d0c33c1a177280ac143358a83b0 100644 |
| --- a/components/autofill/core/browser/credit_card.cc |
| +++ b/components/autofill/core/browser/credit_card.cc |
| @@ -155,6 +155,31 @@ int CreditCard::IconResourceId(const std::string& type) { |
| return IDR_AUTOFILL_CC_GENERIC; |
| } |
| +//static |
| +int CreditCard::PaymentRequestIconResourceId(const std::string& type) { |
|
Mathieu
2017/01/12 21:27:11
Would this fit alongside these: https://cs.chromiu
anthonyvd
2017/01/13 16:09:19
See Rouslan's comment below and my reply :)
|
| + if (type == kAmericanExpressCard) |
|
please use gerrit instead
2017/01/12 19:34:02
return GetPaymentRequestData(type).icon_resource_i
anthonyvd
2017/01/13 16:09:19
Ahh, just what I needed! Removed this new function
|
| + return IDR_AUTOFILL_PR_AMEX; |
| + if (type == kDinersCard) |
| + return IDR_AUTOFILL_PR_DINERS; |
| + if (type == kDiscoverCard) |
| + return IDR_AUTOFILL_PR_DISCOVER; |
| + if (type == kJCBCard) |
| + return IDR_AUTOFILL_PR_JCB; |
| + if (type == kMasterCard) |
| + return IDR_AUTOFILL_PR_MASTERCARD; |
| + if (type == kMirCard) |
| + return IDR_AUTOFILL_PR_MIR; |
| + if (type == kUnionPay) |
| + return IDR_AUTOFILL_PR_GENERIC; |
| + if (type == kVisaCard) |
| + return IDR_AUTOFILL_PR_VISA; |
| + |
| + // If you hit this DCHECK, the above list of cases needs to be updated to |
| + // include a new card. |
| + DCHECK_EQ(kGenericCard, type); |
| + return IDR_AUTOFILL_PR_GENERIC; |
| +} |
| + |
| // static |
| const char* CreditCard::GetCreditCardType(const base::string16& number) { |
| // Credit card number specifications taken from: |