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

Issue 2110563002: Use AutofillProfileComparator in place of ad-hoc merge logic. (Closed)

Created:
4 years, 5 months ago by Roger McFarlane (Chromium)
Modified:
4 years, 5 months ago
CC:
browser-components-watch_chromium.org, chromium-reviews, estade+watch_chromium.org, jdonnelly+autofillwatch_chromium.org, rouslan+autofill_chromium.org, sync-reviews_chromium.org, vabr+watchlistautofill_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@merge
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use AutofillProfileComparator in place of ad-hoc merge logic. This CL integrates the AutofillProfileComparator into the profile comparison and merge logic (used during profile creation/update as well as sync). - Use the AutofileProfileComparator::AreMergeabable(p1, p2) API - Use the AutofillProfileComparator::Merge* APIs - Add (in)equality operators to the autofill profile component types (NameInfo, Address, EmailInfo, CompanyInfo, PhoneNumber) - Updates the parser for the data driven autofill tests to be less sensitive to whitespace. BUG=618095 R=mathp@chromium.org, tmartino@chromium.org Committed: https://crrev.com/b457c9197023162148f861d3fb88df2e91b8b3d8 Cr-Commit-Position: refs/heads/master@{#403021}

Patch Set 1 : Initial CL for review #

Total comments: 25

Patch Set 2 : Address comments from sebsg, mathp & tmartino #

Total comments: 2

Patch Set 3 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+326 lines, -468 lines) Patch
M components/autofill/core/browser/address.h View 1 chunk +2 lines, -0 lines 0 comments Download
M components/autofill/core/browser/address.cc View 5 chunks +18 lines, -3 lines 0 comments Download
M components/autofill/core/browser/autofill_merge_unittest.cc View 1 3 chunks +11 lines, -6 lines 0 comments Download
M components/autofill/core/browser/autofill_profile.h View 1 4 chunks +4 lines, -27 lines 0 comments Download
M components/autofill/core/browser/autofill_profile.cc View 1 7 chunks +64 lines, -239 lines 0 comments Download
M components/autofill/core/browser/autofill_profile_comparator_unittest.cc View 1 2 chunks +56 lines, -13 lines 0 comments Download
M components/autofill/core/browser/autofill_profile_unittest.cc View 1 7 chunks +21 lines, -73 lines 0 comments Download
M components/autofill/core/browser/contact_info.h View 3 chunks +6 lines, -0 lines 0 comments Download
M components/autofill/core/browser/contact_info.cc View 3 chunks +15 lines, -0 lines 0 comments Download
M components/autofill/core/browser/form_group.cc View 2 chunks +7 lines, -8 lines 0 comments Download
M components/autofill/core/browser/personal_data_manager.cc View 1 6 chunks +35 lines, -30 lines 0 comments Download
M components/autofill/core/browser/personal_data_manager_unittest.cc View 1 8 chunks +27 lines, -19 lines 0 comments Download
M components/autofill/core/browser/phone_number.h View 1 chunk +2 lines, -0 lines 0 comments Download
M components/autofill/core/browser/phone_number.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M components/autofill/core/browser/webdata/autofill_profile_syncable_service.cc View 1 4 chunks +9 lines, -15 lines 0 comments Download
M components/autofill/core/browser/webdata/autofill_profile_syncable_service_unittest.cc View 1 chunk +1 line, -0 lines 0 comments Download
M components/browser_sync/browser/profile_sync_service_autofill_unittest.cc View 9 chunks +19 lines, -13 lines 0 comments Download
M components/test/data/autofill/merge/output/addressLinesLessInfo.out View 1 chunk +1 line, -1 line 0 comments Download
M components/test/data/autofill/merge/output/addressLinesMoreInfo.out View 1 chunk +1 line, -1 line 0 comments Download
M components/test/data/autofill/merge/output/case.out View 1 chunk +1 line, -1 line 0 comments Download
M components/test/data/autofill/merge/output/email.out View 2 chunks +2 lines, -2 lines 0 comments Download
M components/test/data/autofill/merge/output/identical.out View 1 chunk +1 line, -1 line 0 comments Download
M components/test/data/autofill/merge/output/moreInfo.out View 1 chunk +1 line, -1 line 0 comments Download
M components/test/data/autofill/merge/output/names.out View 1 chunk +1 line, -1 line 0 comments Download
M components/test/data/autofill/merge/output/primarycase.out View 2 chunks +2 lines, -2 lines 0 comments Download
M components/test/data/autofill/merge/output/punctuation.out View 1 chunk +1 line, -1 line 0 comments Download
M components/test/data/autofill/merge/output/singlemerge.out View 2 chunks +2 lines, -2 lines 0 comments Download
M components/test/data/autofill/merge/output/streetaddress.out View 1 chunk +1 line, -1 line 0 comments Download
M components/test/data/autofill/merge/output/validation.out View 2 chunks +7 lines, -7 lines 0 comments Download
M components/test/data/autofill/merge/tools/autofill_merge_common.py View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 23 (9 generated)
Roger McFarlane (Chromium)
Please take a look?
4 years, 5 months ago (2016-06-28 19:05:34 UTC) #5
Nicolas Zea
sync LGTM
4 years, 5 months ago (2016-06-28 19:46:11 UTC) #6
sebsg
Great work. Much cleaner that before too. Thanks! https://codereview.chromium.org/2110563002/diff/60001/components/autofill/core/browser/autofill_merge_unittest.cc File components/autofill/core/browser/autofill_merge_unittest.cc (right): https://codereview.chromium.org/2110563002/diff/60001/components/autofill/core/browser/autofill_merge_unittest.cc#newcode108 components/autofill/core/browser/autofill_merge_unittest.cc:108: nit: ...
4 years, 5 months ago (2016-06-29 08:57:04 UTC) #7
sebsg
Added another small comment to remove even more useless code! https://codereview.chromium.org/2110563002/diff/60001/components/autofill/core/browser/autofill_profile.cc File components/autofill/core/browser/autofill_profile.cc (right): https://codereview.chromium.org/2110563002/diff/60001/components/autofill/core/browser/autofill_profile.cc#newcode542 ...
4 years, 5 months ago (2016-06-29 15:35:24 UTC) #8
Mathieu
Thanks, lgtm but I'll defer to seb because he knows the code much more than ...
4 years, 5 months ago (2016-06-29 15:50:57 UTC) #9
tmartino
lgtm https://codereview.chromium.org/2110563002/diff/60001/components/autofill/core/browser/personal_data_manager_unittest.cc File components/autofill/core/browser/personal_data_manager_unittest.cc (right): https://codereview.chromium.org/2110563002/diff/60001/components/autofill/core/browser/personal_data_manager_unittest.cc#newcode4179 components/autofill/core/browser/personal_data_manager_unittest.cc:4179: // and that the longer address is retained.. ...
4 years, 5 months ago (2016-06-29 18:21:30 UTC) #10
Roger McFarlane (Chromium)
Thanks! Another look? https://codereview.chromium.org/2110563002/diff/60001/components/autofill/core/browser/autofill_merge_unittest.cc File components/autofill/core/browser/autofill_merge_unittest.cc (right): https://codereview.chromium.org/2110563002/diff/60001/components/autofill/core/browser/autofill_merge_unittest.cc#newcode98 components/autofill/core/browser/autofill_merge_unittest.cc:98: if (!value.empty()) { On 2016/06/29 15:50:56, ...
4 years, 5 months ago (2016-06-29 18:21:37 UTC) #11
Roger McFarlane (Chromium)
https://codereview.chromium.org/2110563002/diff/100001/components/autofill/core/browser/autofill_profile.h File components/autofill/core/browser/autofill_profile.h (right): https://codereview.chromium.org/2110563002/diff/100001/components/autofill/core/browser/autofill_profile.h#newcode122 components/autofill/core/browser/autofill_profile.h:122: bool SaveAdditionalInfo(const AutofillProfile& profile, Maybe (in a follow-on CL?) ...
4 years, 5 months ago (2016-06-29 18:26:19 UTC) #13
sebsg
LGTM! https://codereview.chromium.org/2110563002/diff/60001/components/autofill/core/browser/autofill_profile.cc File components/autofill/core/browser/autofill_profile.cc (right): https://codereview.chromium.org/2110563002/diff/60001/components/autofill/core/browser/autofill_profile.cc#newcode549 components/autofill/core/browser/autofill_profile.cc:549: DCHECK(comparator.AreMergeable(*this, profile)); On 2016/06/29 18:21:37, Roger McFarlane (Chromium) ...
4 years, 5 months ago (2016-06-29 19:04:50 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2110563002/120001
4 years, 5 months ago (2016-06-29 19:23:53 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2110563002/120001
4 years, 5 months ago (2016-06-29 19:24:52 UTC) #19
commit-bot: I haz the power
Committed patchset #3 (id:120001)
4 years, 5 months ago (2016-06-30 00:24:10 UTC) #20
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-06-30 00:24:15 UTC) #21
commit-bot: I haz the power
4 years, 5 months ago (2016-06-30 00:25:38 UTC) #23
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/b457c9197023162148f861d3fb88df2e91b8b3d8
Cr-Commit-Position: refs/heads/master@{#403021}

Powered by Google App Engine
This is Rietveld 408576698