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

Issue 6480083: Changed parsing code for the phonenumbers fields to incorporate different com... (Closed)

Created:
9 years, 10 months ago by GeorgeY
Modified:
9 years, 6 months ago
Reviewers:
Ilya Sherman, dhollowa
CC:
chromium-reviews, Ilya Sherman, Paweł Hajdan Jr., James Hawkins, dhollowa
Visibility:
Public.

Description

Changed parsing code for the phonenumbers fields to incorporate different combinations of the phone fields in the forms. Should fix a lot of the phone parsing bugs and make changes to parsing code much easier. BUG=71893, 71897 TEST=unit-tested, please also check that any web-form that includes a phone number fields gets that fields parsed correctly Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=75368

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 41

Patch Set 3 : '' #

Total comments: 10

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+391 lines, -106 lines) Patch
M chrome/browser/autofill/autofill_manager_unittest.cc View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/autofill/autofill_resources.grd View 1 2 3 4 5 1 chunk +15 lines, -3 lines 0 comments Download
M chrome/browser/autofill/form_structure_unittest.cc View 1 2 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/browser/autofill/phone_field.h View 1 2 3 chunks +51 lines, -8 lines 0 comments Download
M chrome/browser/autofill/phone_field.cc View 1 2 3 4 8 chunks +190 lines, -91 lines 0 comments Download
M chrome/browser/autofill/phone_field_unittest.cc View 1 2 3 chunks +7 lines, -2 lines 0 comments Download
A chrome/test/data/autofill/heuristics/input/form_phones_en.html View 1 2 3 1 chunk +75 lines, -0 lines 0 comments Download
A chrome/test/data/autofill/heuristics/output/form_phones_en.out View 1 chunk +48 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
GeorgeY
9 years, 10 months ago (2011-02-15 20:29:23 UTC) #1
dhollowa
http://codereview.chromium.org/6480083/diff/5001/chrome/browser/autofill/form_structure_unittest.cc File chrome/browser/autofill/form_structure_unittest.cc (right): http://codereview.chromium.org/6480083/diff/5001/chrome/browser/autofill/form_structure_unittest.cc#newcode1124 chrome/browser/autofill/form_structure_unittest.cc:1124: // passed phone will be parsed as CC-AC-PHONE. Suggestion: ...
9 years, 10 months ago (2011-02-16 00:25:37 UTC) #2
Ilya Sherman
http://codereview.chromium.org/6480083/diff/5001/chrome/browser/autofill/autofill_resources.grd File chrome/browser/autofill/autofill_resources.grd (right): http://codereview.chromium.org/6480083/diff/5001/chrome/browser/autofill/autofill_resources.grd#newcode124 chrome/browser/autofill/autofill_resources.grd:124: ^-$|\)$ nit: You have "^" only on the left, ...
9 years, 10 months ago (2011-02-16 09:33:22 UTC) #3
dhollowa
http://codereview.chromium.org/6480083/diff/5001/chrome/browser/autofill/phone_field.cc File chrome/browser/autofill/phone_field.cc (right): http://codereview.chromium.org/6480083/diff/5001/chrome/browser/autofill/phone_field.cc#newcode26 chrome/browser/autofill/phone_field.cc:26: { PhoneField::REGEX_SEPARATOR, 0, 0 }, Yes. On 2011/02/16 09:33:22, ...
9 years, 10 months ago (2011-02-16 16:40:03 UTC) #4
GeorgeY
http://codereview.chromium.org/6480083/diff/5001/chrome/browser/autofill/form_structure_unittest.cc File chrome/browser/autofill/form_structure_unittest.cc (right): http://codereview.chromium.org/6480083/diff/5001/chrome/browser/autofill/form_structure_unittest.cc#newcode1124 chrome/browser/autofill/form_structure_unittest.cc:1124: // passed phone will be parsed as CC-AC-PHONE. On ...
9 years, 10 months ago (2011-02-16 20:53:34 UTC) #5
dhollowa
LGTM. Minus one correction to the regex. Thanks! http://codereview.chromium.org/6480083/diff/5001/chrome/browser/autofill/autofill_resources.grd File chrome/browser/autofill/autofill_resources.grd (right): http://codereview.chromium.org/6480083/diff/5001/chrome/browser/autofill/autofill_resources.grd#newcode124 chrome/browser/autofill/autofill_resources.grd:124: ^-$|\)$ ...
9 years, 10 months ago (2011-02-16 21:19:19 UTC) #6
Ilya Sherman
http://codereview.chromium.org/6480083/diff/5001/chrome/browser/autofill/phone_field.cc File chrome/browser/autofill/phone_field.cc (right): http://codereview.chromium.org/6480083/diff/5001/chrome/browser/autofill/phone_field.cc#newcode172 chrome/browser/autofill/phone_field.cc:172: memset(parsed_phone_fields_, 0, sizeof(AutoFillField*) * FIELD_MAX); On 2011/02/16 20:53:34, GeorgeY ...
9 years, 10 months ago (2011-02-16 23:22:08 UTC) #7
GeorgeY
http://codereview.chromium.org/6480083/diff/5001/chrome/browser/autofill/autofill_resources.grd File chrome/browser/autofill/autofill_resources.grd (right): http://codereview.chromium.org/6480083/diff/5001/chrome/browser/autofill/autofill_resources.grd#newcode124 chrome/browser/autofill/autofill_resources.grd:124: ^-$|\)$ On 2011/02/16 21:19:19, dhollowa wrote: > Yes, this ...
9 years, 10 months ago (2011-02-17 00:21:18 UTC) #8
Ilya Sherman
http://codereview.chromium.org/6480083/diff/8001/chrome/browser/autofill/phone_field.cc File chrome/browser/autofill/phone_field.cc (right): http://codereview.chromium.org/6480083/diff/8001/chrome/browser/autofill/phone_field.cc#newcode297 chrome/browser/autofill/phone_field.cc:297: return false; On 2011/02/17 00:21:18, GeorgeY wrote: > On ...
9 years, 10 months ago (2011-02-17 00:35:12 UTC) #9
GeorgeY
9 years, 10 months ago (2011-02-17 01:12:24 UTC) #10
http://codereview.chromium.org/6480083/diff/8001/chrome/browser/autofill/phon...
File chrome/browser/autofill/phone_field.cc (right):

http://codereview.chromium.org/6480083/diff/8001/chrome/browser/autofill/phon...
chrome/browser/autofill/phone_field.cc:297: return false;
On 2011/02/17 00:35:12, Ilya Sherman wrote:
> On 2011/02/17 00:21:18, GeorgeY wrote:
> > On 2011/02/16 23:22:08, Ilya Sherman wrote:
> > > Suppose the final pattern were "// Phone: <ac> - <phone>:3 - <suffix>:4
> (Ext:
> > > <ext>)?".  We could match "<phone>:3" and fail to match "<suffix>:4",
which
> > > would result in |parsed_fields[FIELD_PHONE]| being non-NULL, but we would
> not
> > > actually have successfully parsed the pattern.
> > 
> > Nope. We will not get here until we have a complete match - the check at
#278
> > going to fail and then the check @ #290, so we proceed to the next pattern.
> 
> But there is no next pattern after the final pattern.

After the last pattern we bail out of the function @289

Powered by Google App Engine
This is Rietveld 408576698