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

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: pattern - ASCII- std::string 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..d297ee0e34bee977fb70d7f858cde6045c5e2118 100644
--- a/components/autofill/core/browser/form_field.cc
+++ b/components/autofill/core/browser/form_field.cc
@@ -180,12 +180,12 @@ bool FormField::Match(const AutofillField* field,
const base::string16& pattern,
int match_type) {
if ((match_type & FormField::MATCH_LABEL) &&
- MatchesPattern(field->label, pattern)) {
+ MatchesPattern(field->label, base::UTF16ToASCII(pattern))) {
Evan Stade 2015/11/25 19:33:01 Yes, Ilya's suggestion is good :) This code is not
Ilya Sherman 2015/11/25 22:18:14 Actually, there should not be any conversion here
tfarina 2015/11/26 00:56:34 Done. Though the changes are scaling.
return true;
}
if ((match_type & FormField::MATCH_NAME) &&
- MatchesPattern(field->name, pattern)) {
+ MatchesPattern(field->name, base::UTF16ToASCII(pattern))) {
return true;
}
« no previous file with comments | « components/autofill/core/browser/credit_card_field.cc ('k') | components/autofill/core/browser/validation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698