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

Issue 6676031: Autofill database migration to clean up bogus profiles. (Closed)

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

Description

Autofill database migration to clean up bogus profiles. Adds a |WebDatabase| migration to clean up old profiles. The profiles are merged in much the same way as when aggregated using form submission. Profiles that are identical to another, subsets of another, or contain invalid or incomplete email, state, zip, or address get filtered out. Additionally, the filtered profiles are remembered in a "trash can" mechanism to later reflect these changes in Sync, so that they don't reappear unintentionally. BUG=65625 TEST=PersonalDataManagerTest.*:AutoFillMergeTest.DataDrivenMergeProfiles:WebDatabaseMigrationTest.*:WebDatabaseTest.* Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=78589

Patch Set 1 #

Total comments: 22

Patch Set 2 : Addressing Ilya's review comments. #

Patch Set 3 : Missed a couple. #

Total comments: 2

Patch Set 4 : Move to Lingesh's observer mechanism. #

Total comments: 6

Patch Set 5 : Nit and email. #

Patch Set 6 : Adds fix for upload. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+884 lines, -100 lines) Patch
M chrome/browser/autofill/autofill_country.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/autofill/personal_data_manager.h View 1 2 3 4 5 5 chunks +18 lines, -6 lines 0 comments Download
M chrome/browser/autofill/personal_data_manager.cc View 1 2 3 4 5 9 chunks +157 lines, -62 lines 0 comments Download
M chrome/browser/autofill/personal_data_manager_unittest.cc View 1 2 3 2 chunks +3 lines, -8 lines 0 comments Download
M chrome/browser/autofill/select_control_handler.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/autofill/select_control_handler.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/webdata/web_data_service.h View 1 2 3 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/webdata/web_data_service.cc View 1 2 3 4 5 2 chunks +61 lines, -0 lines 0 comments Download
M chrome/browser/webdata/web_database.h View 1 2 3 4 5 4 chunks +23 lines, -0 lines 0 comments Download
M chrome/browser/webdata/web_database.cc View 1 2 3 4 5 13 chunks +268 lines, -4 lines 0 comments Download
M chrome/browser/webdata/web_database_unittest.cc View 1 2 3 6 chunks +189 lines, -19 lines 0 comments Download
A chrome/test/data/autofill/merge/input/validation.in View 1 chunk +77 lines, -0 lines 0 comments Download
A chrome/test/data/autofill/merge/output/validation.out View 1 chunk +14 lines, -0 lines 0 comments Download
A chrome/test/data/web_database/version_35.sql View 1 chunk +59 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
dhollowa
9 years, 9 months ago (2011-03-16 03:07:01 UTC) #1
Ilya Sherman
http://codereview.chromium.org/6676031/diff/1/chrome/browser/autofill/autofill_country.cc File chrome/browser/autofill/autofill_country.cc (right): http://codereview.chromium.org/6676031/diff/1/chrome/browser/autofill/autofill_country.cc#newcode640 chrome/browser/autofill/autofill_country.cc:640: nit: This line is extraneous. http://codereview.chromium.org/6676031/diff/1/chrome/browser/autofill/autofill_country.h File chrome/browser/autofill/autofill_country.h (right): ...
9 years, 9 months ago (2011-03-16 04:58:57 UTC) #2
Ilya Sherman
I noticed while testing that we don't merge the following two profiles: John Doe, 1 ...
9 years, 9 months ago (2011-03-16 05:09:52 UTC) #3
Ilya Sherman
See also http://code.google.com/p/chromium/issues/detail?id=76359
9 years, 9 months ago (2011-03-16 12:10:01 UTC) #4
dhollowa
http://codereview.chromium.org/6676031/diff/1/chrome/browser/autofill/autofill_country.cc File chrome/browser/autofill/autofill_country.cc (right): http://codereview.chromium.org/6676031/diff/1/chrome/browser/autofill/autofill_country.cc#newcode640 chrome/browser/autofill/autofill_country.cc:640: On 2011/03/16 04:58:57, Ilya Sherman wrote: > nit: This ...
9 years, 9 months ago (2011-03-16 16:13:35 UTC) #5
lipalani1
The observerlist is not thread safe. We can fix that in our end. http://codereview.chromium.org/6676031/diff/5018/chrome/browser/autofill/personal_data_manager.cc File ...
9 years, 9 months ago (2011-03-16 19:53:38 UTC) #6
lipalani
Hi, after talking to Tim it looks like this class is UI thread only class. ...
9 years, 9 months ago (2011-03-16 20:00:30 UTC) #7
dhollowa
Yes, I only ever call |ShouldPushChanges| on the UI thread. On 2011/03/16 20:00:30, lipalani wrote: ...
9 years, 9 months ago (2011-03-16 20:09:15 UTC) #8
dhollowa
http://codereview.chromium.org/6676031/diff/5018/chrome/browser/autofill/personal_data_manager.cc File chrome/browser/autofill/personal_data_manager.cc (right): http://codereview.chromium.org/6676031/diff/5018/chrome/browser/autofill/personal_data_manager.cc#newcode881 chrome/browser/autofill/personal_data_manager.cc:881: web_data_service->EmptyMigrationTrash(true); As discussed, the sync service was being notified ...
9 years, 9 months ago (2011-03-16 22:42:49 UTC) #9
lipalani1
LGTM from sync side!!!
9 years, 9 months ago (2011-03-16 22:46:45 UTC) #10
Ilya Sherman
http://codereview.chromium.org/6676031/diff/5021/chrome/browser/autofill/autofill_profile.cc File chrome/browser/autofill/autofill_profile.cc (left): http://codereview.chromium.org/6676031/diff/5021/chrome/browser/autofill/autofill_profile.cc#oldcode315 chrome/browser/autofill/autofill_profile.cc:315: GetFieldText(AutofillType(EMAIL_ADDRESS)); This isn't the right fix for not merging ...
9 years, 9 months ago (2011-03-16 23:07:15 UTC) #11
dhollowa
http://codereview.chromium.org/6676031/diff/5021/chrome/browser/autofill/autofill_profile.cc File chrome/browser/autofill/autofill_profile.cc (left): http://codereview.chromium.org/6676031/diff/5021/chrome/browser/autofill/autofill_profile.cc#oldcode315 chrome/browser/autofill/autofill_profile.cc:315: GetFieldText(AutofillType(EMAIL_ADDRESS)); Yes, true. Will address later. On 2011/03/16 23:07:16, ...
9 years, 9 months ago (2011-03-17 00:02:41 UTC) #12
Ilya Sherman
LGTM, thanks
9 years, 9 months ago (2011-03-17 00:38:46 UTC) #13
dhollowa
Hi Folks, I noticed and fixed an additional issue I was seeing. In our merge ...
9 years, 9 months ago (2011-03-17 03:12:00 UTC) #14
Ilya Sherman
SLGTM
9 years, 9 months ago (2011-03-17 03:22:12 UTC) #15
lipalani1
9 years, 9 months ago (2011-03-17 18:51:52 UTC) #16
LGTM from sync side.
All updates until sync has been notified are being discarded. This is actually
the lesser of 2 evils. If we let any updates take place before sync had a chance
to start up it would overwrite those updates any way. 

Even currently with out any of this change we have the issue that if sync is in
an unrecoverable state all updates will be overwritten when sync comes back up
online. Which is a different issue that needs to be solved separately.

Powered by Google App Engine
This is Rietveld 408576698