summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/autofill/form_field.cc4
-rw-r--r--chrome/browser/autofill/name_field.cc6
-rw-r--r--chrome/browser/autofill/phone_field.cc2
3 files changed, 7 insertions, 5 deletions
diff --git a/chrome/browser/autofill/form_field.cc b/chrome/browser/autofill/form_field.cc
index 4d4c76f..2ebcb59 100644
--- a/chrome/browser/autofill/form_field.cc
+++ b/chrome/browser/autofill/form_field.cc
@@ -52,8 +52,8 @@ bool FormField::Match(AutoFillField* field, const string16& pattern) {
// For now, we apply the same pattern to the field's label and the field's
// name. Matching the name is a bit of a long shot for many patterns, but
// it generally doesn't hurt to try.
- if (re.match(WebKit::WebString(field->label())) ||
- re.match(WebKit::WebString(field->name()))) {
+ if (re.match(WebKit::WebString(field->label())) != -1 ||
+ re.match(WebKit::WebString(field->name())) != -1) {
return true;
}
diff --git a/chrome/browser/autofill/name_field.cc b/chrome/browser/autofill/name_field.cc
index 8a32dd6..83f5b16 100644
--- a/chrome/browser/autofill/name_field.cc
+++ b/chrome/browser/autofill/name_field.cc
@@ -72,7 +72,8 @@ FirstLastNameField* FirstLastNameField::Parse2(
// asks, in stuffy English style, for just initials and a surname,
// so we match "initials" here (and just fill in a first name there,
// American-style).
- if (!ParseText(&q, ASCIIToUTF16("first name|initials|fname"), &v.first_name_))
+ if (!ParseText(&q, ASCIIToUTF16("first name|firstname|initials|fname"),
+ &v.first_name_))
return NULL;
// We check for a middle initial before checking for a middle name
@@ -86,7 +87,8 @@ FirstLastNameField* FirstLastNameField::Parse2(
ParseText(&q, ASCIIToUTF16("middle name|mname"), &v.middle_name_);
}
- if (!ParseText(&q, ASCIIToUTF16("last name|lname|surname"), &v.last_name_))
+ if (!ParseText(&q, ASCIIToUTF16("last name|lastname|lname|surname"),
+ &v.last_name_))
return NULL;
*iter = q;
diff --git a/chrome/browser/autofill/phone_field.cc b/chrome/browser/autofill/phone_field.cc
index d0963408..00ff7ba 100644
--- a/chrome/browser/autofill/phone_field.cc
+++ b/chrome/browser/autofill/phone_field.cc
@@ -42,7 +42,7 @@ PhoneField* PhoneField::Parse(std::vector<AutoFillField*>::const_iterator* iter,
// uk/Furniture123-1.html) have several phone numbers in succession and we
// don't want those to be parsed as components of a single phone number.
if (phone2 == NULL)
- ParseText(&q, ASCIIToUTF16("^-|)|"), &phone2);
+ ParseText(&q, ASCIIToUTF16("^-|\\)|"), &phone2);
// Look for a third text box.
if (phone2)