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

Issue 7043027: Autofill refactor form_field.h/cc. (Closed)

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

Description

Autofill refactor form_field.h/cc. 1. Moves FormField methods into proper public/protected/private visibility. 2. Eliminates redundant "Parse" methods. 3. Introduces |MatchType| bit field to simplify variant matching. 4. Consolidates |Match| method. 5. Renames |Add| and |GetFieldInfo| to |AddClassification| and |ClassifyField| respectively. 6. Move ECML logic into separate file. BUG=none TEST=Unit tests in autofill/*_field_unittest.cc. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=86016

Patch Set 1 #

Total comments: 25

Patch Set 2 : Addressing Ilya's comments. #

Patch Set 3 : OVERRIDE glitch. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+726 lines, -650 lines) Patch
M chrome/browser/autofill/address_field.h View 1 2 chunks +24 lines, -5 lines 0 comments Download
M chrome/browser/autofill/address_field.cc View 1 12 chunks +78 lines, -75 lines 0 comments Download
M chrome/browser/autofill/address_field_unittest.cc View 1 20 chunks +20 lines, -42 lines 0 comments Download
A chrome/browser/autofill/autofill_ecml.h View 1 chunk +74 lines, -0 lines 0 comments Download
A chrome/browser/autofill/autofill_ecml.cc View 1 chunk +139 lines, -0 lines 0 comments Download
M chrome/browser/autofill/credit_card_field.h View 1 2 chunks +12 lines, -3 lines 0 comments Download
M chrome/browser/autofill/credit_card_field.cc View 9 chunks +36 lines, -29 lines 0 comments Download
M chrome/browser/autofill/credit_card_field_unittest.cc View 8 chunks +7 lines, -11 lines 0 comments Download
M chrome/browser/autofill/email_field.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/autofill/email_field.cc View 2 chunks +7 lines, -4 lines 0 comments Download
M chrome/browser/autofill/form_field.h View 1 2 chunks +50 lines, -110 lines 0 comments Download
M chrome/browser/autofill/form_field.cc View 1 6 chunks +56 lines, -218 lines 0 comments Download
M chrome/browser/autofill/form_field_unittest.cc View 1 chunk +50 lines, -30 lines 0 comments Download
M chrome/browser/autofill/name_field.h View 1 2 chunks +14 lines, -34 lines 0 comments Download
M chrome/browser/autofill/name_field.cc View 1 2 6 chunks +85 lines, -27 lines 0 comments Download
M chrome/browser/autofill/name_field_unittest.cc View 12 chunks +10 lines, -14 lines 0 comments Download
M chrome/browser/autofill/phone_field.h View 1 1 chunk +15 lines, -2 lines 0 comments Download
M chrome/browser/autofill/phone_field.cc View 7 chunks +34 lines, -31 lines 0 comments Download
M chrome/browser/autofill/phone_field_unittest.cc View 12 chunks +11 lines, -14 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
dhollowa
9 years, 7 months ago (2011-05-19 02:26:04 UTC) #1
Ilya Sherman
http://codereview.chromium.org/7043027/diff/1/chrome/browser/autofill/address_field.cc File chrome/browser/autofill/address_field.cc (right): http://codereview.chromium.org/7043027/diff/1/chrome/browser/autofill/address_field.cc#newcode304 chrome/browser/autofill/address_field.cc:304: &address_field->zip4_); nit: indentation (probably other places with ParseText->ParseField as ...
9 years, 7 months ago (2011-05-19 05:44:16 UTC) #2
dhollowa
http://codereview.chromium.org/7043027/diff/1/chrome/browser/autofill/address_field.cc File chrome/browser/autofill/address_field.cc (right): http://codereview.chromium.org/7043027/diff/1/chrome/browser/autofill/address_field.cc#newcode304 chrome/browser/autofill/address_field.cc:304: &address_field->zip4_); On 2011/05/19 05:44:16, Ilya Sherman wrote: > nit: ...
9 years, 7 months ago (2011-05-19 17:53:08 UTC) #3
Ilya Sherman
LGTM, thanks http://codereview.chromium.org/7043027/diff/1/chrome/browser/autofill/form_field.h File chrome/browser/autofill/form_field.h (right): http://codereview.chromium.org/7043027/diff/1/chrome/browser/autofill/form_field.h#newcode52 chrome/browser/autofill/form_field.h:52: static bool ParseFieldSpecifics(AutofillScanner* scanner, Ok. "Specifics" still ...
9 years, 7 months ago (2011-05-19 20:24:09 UTC) #4
honten.org
Are you done for refactoring? Or do you need more? On 2011/05/19 20:24:09, Ilya Sherman ...
9 years, 7 months ago (2011-05-20 02:50:19 UTC) #5
dhollowa
9 years, 7 months ago (2011-05-20 15:55:15 UTC) #6
Still some more coming, yes.

On 2011/05/20 02:50:19, honten wrote:
> Are you done for refactoring?
> 
> Or do you need more?
> 
> On 2011/05/19 20:24:09, Ilya Sherman wrote:
> > LGTM, thanks
> > 
> >
>
http://codereview.chromium.org/7043027/diff/1/chrome/browser/autofill/form_fi...
> > File chrome/browser/autofill/form_field.h (right):
> > 
> >
>
http://codereview.chromium.org/7043027/diff/1/chrome/browser/autofill/form_fi...
> > chrome/browser/autofill/form_field.h:52: static bool
> > ParseFieldSpecifics(AutofillScanner* scanner,
> > Ok.  "Specifics" still doesn't evoke "label and/or name" for me; but as I
> don't
> > have any better suggestions, let's keep this for now.
> > 
> > On 2011/05/19 17:53:08, dhollowa wrote:
> > > I had a few: ParseFieldVariant, ParseFieldWithMatch... But
> ParseFieldSpecifics
> > > seems most accurate and descriptive to me.
> > > 
> > > On 2011/05/19 05:44:16, Ilya Sherman wrote:
> > > > I don't really get much out of the term "Specifics" -- other than that
> this
> > is
> > > > mostly like |ParseField|, but with something to be wary of.  I don't
have
> > any
> > > > better suggestions right now, but perhaps you had some alternate names
in
> > > mind?
> > >

Powered by Google App Engine
This is Rietveld 408576698