| 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 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <ostream> | 10 #include <ostream> |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 void CreditCard::GetMatchingTypes(const base::string16& text, | 401 void CreditCard::GetMatchingTypes(const base::string16& text, |
| 402 const std::string& app_locale, | 402 const std::string& app_locale, |
| 403 ServerFieldTypeSet* matching_types) const { | 403 ServerFieldTypeSet* matching_types) const { |
| 404 FormGroup::GetMatchingTypes(text, app_locale, matching_types); | 404 FormGroup::GetMatchingTypes(text, app_locale, matching_types); |
| 405 | 405 |
| 406 base::string16 card_number = | 406 base::string16 card_number = |
| 407 GetInfo(AutofillType(CREDIT_CARD_NUMBER), app_locale); | 407 GetInfo(AutofillType(CREDIT_CARD_NUMBER), app_locale); |
| 408 if (!card_number.empty() && StripSeparators(text) == card_number) | 408 if (!card_number.empty() && StripSeparators(text) == card_number) |
| 409 matching_types->insert(CREDIT_CARD_NUMBER); | 409 matching_types->insert(CREDIT_CARD_NUMBER); |
| 410 | 410 |
| 411 NOTIMPLEMENTED() << " GETMATCINGTYPES " << text; | |
| 412 int month; | 411 int month; |
| 413 if (ConvertMonth(text, app_locale, &month) && | 412 if (ConvertMonth(text, app_locale, &month) && |
| 414 month == expiration_month_) { | 413 month == expiration_month_) { |
| 415 matching_types->insert(CREDIT_CARD_EXP_MONTH); | 414 matching_types->insert(CREDIT_CARD_EXP_MONTH); |
| 416 } | 415 } |
| 417 } | 416 } |
| 418 | 417 |
| 419 const base::string16 CreditCard::Label() const { | 418 const base::string16 CreditCard::Label() const { |
| 420 std::pair<base::string16, base::string16> pieces = LabelPieces(); | 419 std::pair<base::string16, base::string16> pieces = LabelPieces(); |
| 421 return pieces.first + pieces.second; | 420 return pieces.first + pieces.second; |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 784 const char* const kAmericanExpressCard = "americanExpressCC"; | 783 const char* const kAmericanExpressCard = "americanExpressCC"; |
| 785 const char* const kDinersCard = "dinersCC"; | 784 const char* const kDinersCard = "dinersCC"; |
| 786 const char* const kDiscoverCard = "discoverCC"; | 785 const char* const kDiscoverCard = "discoverCC"; |
| 787 const char* const kGenericCard = "genericCC"; | 786 const char* const kGenericCard = "genericCC"; |
| 788 const char* const kJCBCard = "jcbCC"; | 787 const char* const kJCBCard = "jcbCC"; |
| 789 const char* const kMasterCard = "masterCardCC"; | 788 const char* const kMasterCard = "masterCardCC"; |
| 790 const char* const kUnionPay = "unionPayCC"; | 789 const char* const kUnionPay = "unionPayCC"; |
| 791 const char* const kVisaCard = "visaCC"; | 790 const char* const kVisaCard = "visaCC"; |
| 792 | 791 |
| 793 } // namespace autofill | 792 } // namespace autofill |
| OLD | NEW |