summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill/phone_field.cc
diff options
context:
space:
mode:
authordhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-20 19:30:20 +0000
committerdhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-20 19:30:20 +0000
commit452bb48838c784b237c0844aa4708396b0dce35b (patch)
treecb7cc12ad9a82cad13fbcbeb55087aa305216e92 /chrome/browser/autofill/phone_field.cc
parent90864a884d166bc380fc354e6a448bea1230a087 (diff)
downloadchromium_src-452bb48838c784b237c0844aa4708396b0dce35b.zip
chromium_src-452bb48838c784b237c0844aa4708396b0dce35b.tar.gz
chromium_src-452bb48838c784b237c0844aa4708396b0dce35b.tar.bz2
AutoFill telephone number prefix and suffix heuristics.
Extends matching of telephone number prefix and suffix fields to include fields explicitly labeled with "prefix" and "suffix" strings. BUG=40694 TEST=PhoneFieldTest.ThreePartPhoneNumberPrefixSuffix Review URL: http://codereview.chromium.org/2129016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47829 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill/phone_field.cc')
-rw-r--r--chrome/browser/autofill/phone_field.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/browser/autofill/phone_field.cc b/chrome/browser/autofill/phone_field.cc
index 6092fe4..5b4494d 100644
--- a/chrome/browser/autofill/phone_field.cc
+++ b/chrome/browser/autofill/phone_field.cc
@@ -46,11 +46,11 @@ 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("^-$|\\)$|prefix"), &phone2);
// Look for a third text box.
if (phone2)
- ParseText(&q, ASCIIToUTF16("^-$"), &phone3);
+ ParseText(&q, ASCIIToUTF16("^-$|suffix"), &phone3);
// Now we have one, two, or three phone number text fields. Package them
// up into a PhoneField object.