| Index: components/autofill/core/browser/credit_card_field.cc
|
| diff --git a/components/autofill/core/browser/credit_card_field.cc b/components/autofill/core/browser/credit_card_field.cc
|
| index 3b24ec38c1851268949aaa7ce297cda4ded4c9d8..a7e4cae912350396bc574c313ab0993b2d5a6f76 100644
|
| --- a/components/autofill/core/browser/credit_card_field.cc
|
| +++ b/components/autofill/core/browser/credit_card_field.cc
|
| @@ -40,7 +40,8 @@ bool FindConsecutiveStrings(const std::vector<base::string16>& regex_needles,
|
|
|
| for (size_t i = 0; i < haystack.size() - regex_needles.size() + 1; ++i) {
|
| for (size_t j = 0; j < regex_needles.size(); ++j) {
|
| - if (!MatchesPattern(haystack[i + j], regex_needles[j]))
|
| + if (!MatchesPattern(haystack[i + j],
|
| + base::UTF16ToASCII(regex_needles[j])))
|
| break;
|
|
|
| if (j == regex_needles.size() - 1)
|
| @@ -214,8 +215,7 @@ bool CreditCardField::LikelyCardMonthSelectField(AutofillScanner* scanner) {
|
| return false;
|
|
|
| // Filter out years.
|
| - const base::string16 kNumericalYearRe =
|
| - base::ASCIIToUTF16("[1-9][0-9][0-9][0-9]");
|
| + const char kNumericalYearRe[] = "[1-9][0-9][0-9][0-9]";
|
| for (const auto& value : field->option_values) {
|
| if (MatchesPattern(value, kNumericalYearRe))
|
| return false;
|
| @@ -226,7 +226,7 @@ bool CreditCardField::LikelyCardMonthSelectField(AutofillScanner* scanner) {
|
| }
|
|
|
| // Look for numerical months.
|
| - const base::string16 kNumericalMonthRe = base::ASCIIToUTF16("12");
|
| + const char kNumericalMonthRe[] = "12";
|
| if (MatchesPattern(field->option_values.back(), kNumericalMonthRe) ||
|
| MatchesPattern(field->option_contents.back(), kNumericalMonthRe)) {
|
| return true;
|
|
|