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

Issue 1694443004: [Autofill] Add credit card first and last name heuristics predictions. (Closed)

Created:
4 years, 10 months ago by sebsg
Modified:
4 years, 7 months ago
Reviewers:
Mathieu, Lei Zhang
CC:
bondd+autofillwatch_chromium.org, browser-components-watch_chromium.org, chromium-reviews, estade+watch_chromium.org, jdonnelly+autofillwatch_chromium.org, rouslan+autofill_chromium.org, vabr+watchlistautofill_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Added two new field types : CREDIT_CARD_NAME_FIRST and CREDIT_CARD_NAME_LAST. Modified the heuristics to recognize these two new fields. Added code to be able to fill these new fields with the data already available. This will fix Keurig.com and sites like this example: https://f117f41fdbc2c18ce6861c4fac2e807ecf7f1d75.googledrive.com/host/0B3xzZ-vFr2LRU0FlVEhGa09uSDA Since it's still pretty conservative. It won't fix sites like Cabelas.com where the fields are named "firstname" and "lastname" The original heuristics predictions on Keurig.com were: NAME_FIRST | card_firstNameOnCard | First Name* NAME_LAST | card_lastNameOnCard | Last Name* UNKNOWN_TYPE | card_accountNumber | Card Number* UNKNOWN_TYPE | card_cardType | Card Type UNKNOWN_TYPE | | Please select a card type UNKNOWN_TYPE | card_expirationMonth | Expiration Date* UNKNOWN_TYPE | | Month CREDIT_CARD_EXP_MONTH | card_expirationYear | Expiration Date* CREDIT_CARD_EXP_4_DIGIT_YEAR | | Year | CREDIT_CARD_VERIFICATION_CODE | card_cvNumber | Security Code* TBR=thestig@chromium.org BUG=579174 TEST=AutofillManagerTest, FormStructureTest Committed: https://crrev.com/0a8abd1cd85e42b969740ca38e01df01ff244743 Cr-Commit-Position: refs/heads/master@{#378551}

Patch Set 1 #

Total comments: 18

Patch Set 2 : Patch2 #

Total comments: 8

Patch Set 3 : Nits #

Patch Set 4 : Rebase #

Patch Set 5 : Fix #

Patch Set 6 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+764 lines, -370 lines) Patch
M chrome/browser/autofill/android/personal_data_manager_android.cc View 1 2 3 2 chunks +6 lines, -4 lines 0 comments Download
M chrome/browser/autofill/autofill_browsertest.cc View 1 3 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/extensions/api/autofill_private/autofill_private_api.cc View 1 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/extensions/api/autofill_private/autofill_util.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/test/integration/single_client_wallet_sync_test.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/autofill/autofill_dialog_controller_browsertest.cc View 1 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc View 1 5 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/ui/autofill/data_model_wrapper.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/options/autofill_options_handler.cc View 1 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/test/data/autofill/autofill_creditcard_form.html View 1 1 chunk +1 line, -1 line 0 comments Download
A chrome/test/data/autofill/heuristics/input/27_checkout_cc_keurig.com.html View 1 1 chunk +131 lines, -0 lines 0 comments Download
M chrome/test/data/autofill/heuristics/output/000_i18n_de.out View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/autofill/heuristics/output/001_i18n_de2.out View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/autofill/heuristics/output/002_i18n_en.out View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/autofill/heuristics/output/003_i18n_es.out View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/autofill/heuristics/output/004_i18n_fr.out View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/autofill/heuristics/output/005_i18n_it.out View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/autofill/heuristics/output/006_i18n_ja.out View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/autofill/heuristics/output/008_i18n_pt.out View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/autofill/heuristics/output/009_i18n_ru.out View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/autofill/heuristics/output/010_i18n_zh_cn.out View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/autofill/heuristics/output/011_i18n_zh_tw.out View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/autofill/heuristics/output/013_autocomplete_attribute_basic.out View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/test/data/autofill/heuristics/output/025_checkout_hsn.com.out View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/autofill/heuristics/output/081_crbug_64569.out View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/autofill/heuristics/output/084_crbug_93595.out View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/autofill/heuristics/output/085_crbug_98152.out View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/autofill/heuristics/output/087_crbug_98286.out View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/autofill/heuristics/output/092_checkout_alaskaair.com.out View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/test/data/autofill/heuristics/output/103_checkout_peapod.com.out View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/autofill/heuristics/output/104_checkout_m_kohls.com.out View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/autofill/heuristics/output/106_checkout_m_amazon.com.out View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/autofill/heuristics/output/111_checkout_virgin_america.com.out View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/autofill/heuristics/output/114_cc_checkout_wayfair.com.out View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/autofill/heuristics/output/117_cc_checkout_macys.com.out View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/test/data/autofill/heuristics/output/118_checkout_cvs.com.out View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/test/data/autofill/heuristics/output/127_bug_463986.out View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/test/data/autofill/heuristics/output/128_bug_464002.out View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/autofill/heuristics/output/129_bug_465053.out View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/autofill/heuristics/output/131_bug_465587.out View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/autofill/heuristics/output/136_bug_497850.out View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/autofill/heuristics/output/137_bug_555010.out View 1 2 3 4 5 3 chunks +3 lines, -3 lines 0 comments Download
A chrome/test/data/autofill/heuristics/output/27_checkout_cc_keurig.com.out View 1 1 chunk +10 lines, -0 lines 0 comments Download
M components/autofill.gypi View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M components/autofill/content/browser/wallet/full_wallet.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M components/autofill/core/browser/BUILD.gn View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download
A components/autofill/core/browser/autofill_data_util.h View 1 1 chunk +28 lines, -0 lines 0 comments Download
A components/autofill/core/browser/autofill_data_util.cc View 1 chunk +132 lines, -0 lines 0 comments Download
A components/autofill/core/browser/autofill_data_util_unittest.cc View 1 chunk +46 lines, -0 lines 0 comments Download
M components/autofill/core/browser/autofill_field.cc View 1 2 3 4 5 1 chunk +11 lines, -5 lines 0 comments Download
M components/autofill/core/browser/autofill_ie_toolbar_import_win.cc View 1 2 1 chunk +27 lines, -27 lines 0 comments Download
M components/autofill/core/browser/autofill_ie_toolbar_import_win_unittest.cc View 1 2 2 chunks +11 lines, -9 lines 0 comments Download
M components/autofill/core/browser/autofill_manager.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M components/autofill/core/browser/autofill_manager_unittest.cc View 1 2 3 4 5 2 chunks +37 lines, -1 line 0 comments Download
M components/autofill/core/browser/autofill_metrics.cc View 1 2 3 4 5 2 chunks +3 lines, -3 lines 0 comments Download
M components/autofill/core/browser/autofill_profile.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M components/autofill/core/browser/autofill_regex_constants.cc View 1 2 3 1 chunk +8 lines, -8 lines 0 comments Download
M components/autofill/core/browser/autofill_test_utils.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M components/autofill/core/browser/autofill_type.cc View 1 5 chunks +26 lines, -8 lines 0 comments Download
M components/autofill/core/browser/contact_info.cc View 2 chunks +2 lines, -126 lines 0 comments Download
M components/autofill/core/browser/credit_card.cc View 1 6 chunks +25 lines, -24 lines 0 comments Download
M components/autofill/core/browser/credit_card_field.cc View 1 2 3 4 5 2 chunks +19 lines, -3 lines 0 comments Download
M components/autofill/core/browser/credit_card_field_unittest.cc View 1 2 3 9 chunks +9 lines, -9 lines 0 comments Download
M components/autofill/core/browser/credit_card_unittest.cc View 1 5 chunks +11 lines, -9 lines 0 comments Download
M components/autofill/core/browser/field_types.h View 1 2 3 3 chunks +9 lines, -3 lines 0 comments Download
M components/autofill/core/browser/form_structure.cc View 1 2 3 4 5 1 chunk +7 lines, -1 line 0 comments Download
M components/autofill/core/browser/form_structure_unittest.cc View 1 2 3 4 5 9 chunks +74 lines, -14 lines 0 comments Download
M components/autofill/core/browser/payments/payments_client.cc View 1 2 3 4 5 1 chunk +4 lines, -3 lines 0 comments Download
M components/autofill/core/browser/personal_data_manager.cc View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M components/autofill/core/browser/personal_data_manager_unittest.cc View 1 2 3 12 chunks +26 lines, -22 lines 0 comments Download
M components/autofill/core/browser/server_field_types_util.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M components/autofill/core/browser/webdata/autofill_table.cc View 1 2 3 4 chunks +4 lines, -4 lines 0 comments Download
M components/autofill/core/browser/webdata/autofill_table_unittest.cc View 1 11 chunks +18 lines, -12 lines 0 comments Download
M components/autofill/core/browser/webdata/autofill_wallet_syncable_service.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M components/autofill/core/browser/webdata/web_data_service_unittest.cc View 1 2 chunks +3 lines, -3 lines 0 comments Download
M components/autofill/ios/browser/credit_card_util.mm View 1 1 chunk +1 line, -1 line 0 comments Download
M components/components_tests.gyp View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 25 (14 generated)
sebsg
Could you please take a look? Thanks!
4 years, 10 months ago (2016-02-12 16:49:48 UTC) #4
Mathieu
Please include example of pages where this parsing logic now correctly detects first and last ...
4 years, 10 months ago (2016-02-12 20:53:30 UTC) #5
Mathieu
more comments :) https://codereview.chromium.org/1694443004/diff/20001/components/autofill/core/browser/autofill_field.cc File components/autofill/core/browser/autofill_field.cc (right): https://codereview.chromium.org/1694443004/diff/20001/components/autofill/core/browser/autofill_field.cc#newcode502 components/autofill/core/browser/autofill_field.cc:502: // See http://crbug.com/441488 for potential improvements ...
4 years, 10 months ago (2016-02-23 15:23:03 UTC) #7
sebsg
PTAL :) https://codereview.chromium.org/1694443004/diff/20001/components/autofill/core/browser/autofill_data_util.h File components/autofill/core/browser/autofill_data_util.h (right): https://codereview.chromium.org/1694443004/diff/20001/components/autofill/core/browser/autofill_data_util.h#newcode20 components/autofill/core/browser/autofill_data_util.h:20: // splitting. On 2016/02/12 20:53:30, Mathieu Perreault ...
4 years, 10 months ago (2016-02-24 18:49:44 UTC) #10
Mathieu
lgtm with nits https://codereview.chromium.org/1694443004/diff/60001/components/autofill/core/browser/autofill_ie_toolbar_import_win.cc File components/autofill/core/browser/autofill_ie_toolbar_import_win.cc (right): https://codereview.chromium.org/1694443004/diff/60001/components/autofill/core/browser/autofill_ie_toolbar_import_win.cc#newcode127 components/autofill/core/browser/autofill_ie_toolbar_import_win.cc:127: {CREDIT_CARD_NAME_FULL, L"CREDIT_CARD_NAME_FULL"}, fix to lowercase https://codereview.chromium.org/1694443004/diff/60001/components/autofill/core/browser/autofill_ie_toolbar_import_win_unittest.cc ...
4 years, 10 months ago (2016-02-24 21:58:26 UTC) #11
sebsg
Could you please take another look? https://codereview.chromium.org/1694443004/diff/60001/components/autofill/core/browser/autofill_ie_toolbar_import_win.cc File components/autofill/core/browser/autofill_ie_toolbar_import_win.cc (right): https://codereview.chromium.org/1694443004/diff/60001/components/autofill/core/browser/autofill_ie_toolbar_import_win.cc#newcode127 components/autofill/core/browser/autofill_ie_toolbar_import_win.cc:127: {CREDIT_CARD_NAME_FULL, L"CREDIT_CARD_NAME_FULL"}, On ...
4 years, 9 months ago (2016-03-01 16:32:53 UTC) #12
sebsg
Hi thestig@, putting you as TBR for the name change of CREDIT_CARD_NAME to CREDIT_CARD_NAME_FULL in ...
4 years, 9 months ago (2016-03-01 20:36:18 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1694443004/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1694443004/140001
4 years, 9 months ago (2016-03-01 20:37:05 UTC) #20
commit-bot: I haz the power
Committed patchset #6 (id:140001)
4 years, 9 months ago (2016-03-01 20:45:16 UTC) #22
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/0a8abd1cd85e42b969740ca38e01df01ff244743 Cr-Commit-Position: refs/heads/master@{#378551}
4 years, 9 months ago (2016-03-01 20:47:15 UTC) #24
Lei Zhang
4 years, 7 months ago (2016-05-19 20:14:35 UTC) #25
Message was sent while issue was closed.
On 2016/03/01 20:36:18, sebsg wrote:
> Hi thestig@, putting you as TBR for the name change of CREDIT_CARD_NAME to
> CREDIT_CARD_NAME_FULL in 
> 
> chrome/browser/extensions/*
> chrome/browser/sync/*
> chrome/browser/ui/*
> 
> Thanks!

A belated lgtm for you!

Powered by Google App Engine
This is Rietveld 408576698