| Index: components/autofill/core/browser/validation.cc
|
| diff --git a/components/autofill/core/browser/validation.cc b/components/autofill/core/browser/validation.cc
|
| index dc5ddd33bce9a7f0e9bd5447f48f6645bddf92e3..177785d4c6faa06d097ae6555160dfb73dec1aeb 100644
|
| --- a/components/autofill/core/browser/validation.cc
|
| +++ b/components/autofill/core/browser/validation.cc
|
| @@ -128,10 +128,9 @@ bool IsValidCreditCardSecurityCode(const base::string16& text) {
|
|
|
| bool IsValidCreditCardSecurityCode(const base::string16& code,
|
| const base::string16& number) {
|
| - CreditCard card;
|
| - card.SetRawInfo(CREDIT_CARD_NUMBER, number);
|
| + std::string type = CreditCard::GetCreditCardType(number);
|
| size_t required_length = 3;
|
| - if (card.type() == kAmericanExpressCard)
|
| + if (type == kAmericanExpressCard)
|
| required_length = 4;
|
|
|
| return code.length() == required_length;
|
|
|