Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(689)

Unified Diff: components/autofill/core/browser/form_field.cc

Issue 1453193002: autofill: switch autofill_regexes to RE2 library (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: macros.h Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/autofill/core/browser/form_field.cc
diff --git a/components/autofill/core/browser/form_field.cc b/components/autofill/core/browser/form_field.cc
index 50d7e8a30a81cf74343e3656627695840085f9cf..4c11c89a99930a5cb3df40cc8586d6953772aa32 100644
--- a/components/autofill/core/browser/form_field.cc
+++ b/components/autofill/core/browser/form_field.cc
@@ -180,12 +180,14 @@ bool FormField::Match(const AutofillField* field,
const base::string16& pattern,
int match_type) {
if ((match_type & FormField::MATCH_LABEL) &&
- MatchesPattern(field->label, pattern)) {
+ MatchesPattern(base::UTF16ToASCII(field->label),
+ base::UTF16ToASCII(pattern))) {
return true;
}
if ((match_type & FormField::MATCH_NAME) &&
- MatchesPattern(field->name, pattern)) {
+ MatchesPattern(base::UTF16ToASCII(field->name),
+ base::UTF16ToASCII(pattern))) {
return true;
}

Powered by Google App Engine
This is Rietveld 408576698