| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/autofill/core/browser/credit_card.h" | 5 #include "components/autofill/core/browser/credit_card.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 return l10n_util::GetStringUTF16(IDS_AUTOFILL_CC_AMEX_SHORT); | 128 return l10n_util::GetStringUTF16(IDS_AUTOFILL_CC_AMEX_SHORT); |
| 129 | 129 |
| 130 return ::autofill::TypeForFill(type); | 130 return ::autofill::TypeForFill(type); |
| 131 } | 131 } |
| 132 | 132 |
| 133 // static | 133 // static |
| 134 int CreditCard::IconResourceId(const std::string& type) { | 134 int CreditCard::IconResourceId(const std::string& type) { |
| 135 if (type == kAmericanExpressCard) | 135 if (type == kAmericanExpressCard) |
| 136 return IDR_AUTOFILL_CC_AMEX; | 136 return IDR_AUTOFILL_CC_AMEX; |
| 137 if (type == kDinersCard) | 137 if (type == kDinersCard) |
| 138 return IDR_AUTOFILL_CC_GENERIC; | 138 return IDR_AUTOFILL_CC_DINERS; |
| 139 if (type == kDiscoverCard) | 139 if (type == kDiscoverCard) |
| 140 return IDR_AUTOFILL_CC_DISCOVER; | 140 return IDR_AUTOFILL_CC_DISCOVER; |
| 141 if (type == kJCBCard) | 141 if (type == kJCBCard) |
| 142 return IDR_AUTOFILL_CC_GENERIC; | 142 return IDR_AUTOFILL_CC_JCB; |
| 143 if (type == kMasterCard) | 143 if (type == kMasterCard) |
| 144 return IDR_AUTOFILL_CC_MASTERCARD; | 144 return IDR_AUTOFILL_CC_MASTERCARD; |
| 145 if (type == kMirCard) | 145 if (type == kMirCard) |
| 146 return IDR_AUTOFILL_CC_MIR; | 146 return IDR_AUTOFILL_CC_MIR; |
| 147 if (type == kUnionPay) | 147 if (type == kUnionPay) |
| 148 return IDR_AUTOFILL_CC_GENERIC; | 148 return IDR_AUTOFILL_CC_GENERIC; |
| 149 if (type == kVisaCard) | 149 if (type == kVisaCard) |
| 150 return IDR_AUTOFILL_CC_VISA; | 150 return IDR_AUTOFILL_CC_VISA; |
| 151 | 151 |
| 152 // If you hit this DCHECK, the above list of cases needs to be updated to | 152 // If you hit this DCHECK, the above list of cases needs to be updated to |
| (...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 872 const char kDinersCard[] = "dinersCC"; | 872 const char kDinersCard[] = "dinersCC"; |
| 873 const char kDiscoverCard[] = "discoverCC"; | 873 const char kDiscoverCard[] = "discoverCC"; |
| 874 const char kGenericCard[] = "genericCC"; | 874 const char kGenericCard[] = "genericCC"; |
| 875 const char kJCBCard[] = "jcbCC"; | 875 const char kJCBCard[] = "jcbCC"; |
| 876 const char kMasterCard[] = "masterCardCC"; | 876 const char kMasterCard[] = "masterCardCC"; |
| 877 const char kMirCard[] = "mirCC"; | 877 const char kMirCard[] = "mirCC"; |
| 878 const char kUnionPay[] = "unionPayCC"; | 878 const char kUnionPay[] = "unionPayCC"; |
| 879 const char kVisaCard[] = "visaCC"; | 879 const char kVisaCard[] = "visaCC"; |
| 880 | 880 |
| 881 } // namespace autofill | 881 } // namespace autofill |
| OLD | NEW |