New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 627519 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

[Autofill] Sync clobbers and recrecreates de-duplicated autofill profiles

Project Member Reported by rogerm@chromium.org, Jul 12 2016

Issue description

Version: M53
OS: All that support autofill profile sync

What steps will reproduce the problem?

(1) Have duplicate autofill profiles that we can detect and merge

(2) Run chromium with autofill profile de-duplication enabled
    chrome --enable-features=AutofillProfileCleanup --vmodule=autofill*=2

(3) Observe in the logs that the duplicate profiles are merged and
    discarded... then promptly restored to their old state by sync

What is the expected output?

The duplicate profiles should be merged/discarded and those changes
propagated out by sync.


 

Comment 1 by rogerm@chromium.org, Jul 12 2016

Description: Show this description

Comment 2 by rogerm@chromium.org, Jul 12 2016

Cc: ma...@chromium.org se...@chromium.org zkoch@chromium.org
Components: UI>Browser>Autofill
Owner: rogerm@chromium.org
Status: Started (was: Untriaged)
Project Member

Comment 3 by bugdroid1@chromium.org, Jul 18 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d594dc5f82b5836f5f0b4ba8d52b8563ff3c2f27

commit d594dc5f82b5836f5f0b4ba8d52b8563ff3c2f27
Author: rogerm <rogerm@chromium.org>
Date: Mon Jul 18 17:34:09 2016

Run autofill-profile de-dupe after sync starts if sync is enabled.

This CL updates the PersonalDataManager to run autofill profile
de-duplication (if enabled) at the appropriate time, depending on
whether autofill profile sync is enabled.

If sync is not enabled, profile de-duplication is run after the
data is initially loaded.

If sync is enabled, profild de-duplication is run after the sync
first becomes active.

In all cases, de-duplication is only run once for a given version
of chromium.

BUG= 627519 
R=sebsg@chromium.org, mathp@chromium.org

Review-Url: https://codereview.chromium.org/2142123002
Cr-Commit-Position: refs/heads/master@{#406026}

[modify] https://crrev.com/d594dc5f82b5836f5f0b4ba8d52b8563ff3c2f27/components/autofill/core/browser/autofill_manager.cc
[modify] https://crrev.com/d594dc5f82b5836f5f0b4ba8d52b8563ff3c2f27/components/autofill/core/browser/autofill_profile.cc
[modify] https://crrev.com/d594dc5f82b5836f5f0b4ba8d52b8563ff3c2f27/components/autofill/core/browser/autofill_profile_comparator.cc
[modify] https://crrev.com/d594dc5f82b5836f5f0b4ba8d52b8563ff3c2f27/components/autofill/core/browser/personal_data_manager.cc
[modify] https://crrev.com/d594dc5f82b5836f5f0b4ba8d52b8563ff3c2f27/components/autofill/core/browser/personal_data_manager.h
[modify] https://crrev.com/d594dc5f82b5836f5f0b4ba8d52b8563ff3c2f27/components/autofill/core/browser/personal_data_manager_unittest.cc
[modify] https://crrev.com/d594dc5f82b5836f5f0b4ba8d52b8563ff3c2f27/components/autofill/core/browser/webdata/autocomplete_syncable_service.cc
[modify] https://crrev.com/d594dc5f82b5836f5f0b4ba8d52b8563ff3c2f27/components/autofill/core/browser/webdata/autofill_data_type_controller_unittest.cc
[modify] https://crrev.com/d594dc5f82b5836f5f0b4ba8d52b8563ff3c2f27/components/autofill/core/browser/webdata/autofill_profile_syncable_service.cc
[modify] https://crrev.com/d594dc5f82b5836f5f0b4ba8d52b8563ff3c2f27/components/autofill/core/browser/webdata/autofill_wallet_metadata_syncable_service.cc
[modify] https://crrev.com/d594dc5f82b5836f5f0b4ba8d52b8563ff3c2f27/components/autofill/core/browser/webdata/autofill_wallet_metadata_syncable_service_unittest.cc
[modify] https://crrev.com/d594dc5f82b5836f5f0b4ba8d52b8563ff3c2f27/components/autofill/core/browser/webdata/autofill_wallet_syncable_service.cc
[modify] https://crrev.com/d594dc5f82b5836f5f0b4ba8d52b8563ff3c2f27/components/autofill/core/browser/webdata/autofill_webdata_backend.h
[modify] https://crrev.com/d594dc5f82b5836f5f0b4ba8d52b8563ff3c2f27/components/autofill/core/browser/webdata/autofill_webdata_backend_impl.cc
[modify] https://crrev.com/d594dc5f82b5836f5f0b4ba8d52b8563ff3c2f27/components/autofill/core/browser/webdata/autofill_webdata_backend_impl.h
[modify] https://crrev.com/d594dc5f82b5836f5f0b4ba8d52b8563ff3c2f27/components/autofill/core/browser/webdata/autofill_webdata_service.cc
[modify] https://crrev.com/d594dc5f82b5836f5f0b4ba8d52b8563ff3c2f27/components/autofill/core/browser/webdata/autofill_webdata_service.h
[modify] https://crrev.com/d594dc5f82b5836f5f0b4ba8d52b8563ff3c2f27/components/autofill/core/browser/webdata/autofill_webdata_service_observer.h
[modify] https://crrev.com/d594dc5f82b5836f5f0b4ba8d52b8563ff3c2f27/components/browser_sync/browser/profile_sync_service_autofill_unittest.cc

Comment 4 by rogerm@chromium.org, Jul 18 2016

Labels: Merge-Request-53
This is a fix for a new feature introduced in 53 whose (pre-fix) interaction with sync causes it not to work. Without this fix, duplicates will be cleaned up, reported for statistics, and then recreated by sync.

Please merge to 53

Review-Url: https://codereview.chromium.org/2142123002
Cr-Commit-Position: refs/heads/master@{#406026}

Comment 5 by gov...@chromium.org, Jul 18 2016

Before we approve merge to M53, Could you please confirm whether this change is baked/verified in Canary and safe to merge?

Comment 6 by dimu@google.com, Jul 19 2016

Labels: -Merge-Request-53 Merge-Approved-53 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M53 (branch: 2785)

Comment 7 by gov...@chromium.org, Jul 19 2016

rogerm@ will merge this change to M53 branch by EOD today (Tuesday). 
Project Member

Comment 9 by bugdroid1@chromium.org, Jul 19 2016

Labels: -merge-approved-53 merge-merged-2785
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/23f01b8469b9a91180398faf2ac9feb687b2ef6e

commit 23f01b8469b9a91180398faf2ac9feb687b2ef6e
Author: Mathieu Perreault <mathp@chromium.org>
Date: Tue Jul 19 19:54:45 2016

[Merge M53] Run autofill-profile de-dupe after sync starts if sync is enabled.

This CL updates the PersonalDataManager to run autofill profile
de-duplication (if enabled) at the appropriate time, depending on
whether autofill profile sync is enabled.

If sync is not enabled, profile de-duplication is run after the
data is initially loaded.

If sync is enabled, profild de-duplication is run after the sync
first becomes active.

In all cases, de-duplication is only run once for a given version
of chromium.

BUG= 627519 
R=sebsg@chromium.org, mathp@chromium.org

Review-Url: https://codereview.chromium.org/2142123002
Cr-Commit-Position: refs/heads/master@{#406026}
(cherry picked from commit d594dc5f82b5836f5f0b4ba8d52b8563ff3c2f27)

Review URL: https://codereview.chromium.org/2163783002 .

Cr-Commit-Position: refs/branch-heads/2785@{#221}
Cr-Branched-From: 68623971be0cfc492a2cb0427d7f478e7b214c24-refs/heads/master@{#403382}

[modify] https://crrev.com/23f01b8469b9a91180398faf2ac9feb687b2ef6e/components/autofill/core/browser/autofill_manager.cc
[modify] https://crrev.com/23f01b8469b9a91180398faf2ac9feb687b2ef6e/components/autofill/core/browser/autofill_profile.cc
[modify] https://crrev.com/23f01b8469b9a91180398faf2ac9feb687b2ef6e/components/autofill/core/browser/autofill_profile_comparator.cc
[modify] https://crrev.com/23f01b8469b9a91180398faf2ac9feb687b2ef6e/components/autofill/core/browser/personal_data_manager.cc
[modify] https://crrev.com/23f01b8469b9a91180398faf2ac9feb687b2ef6e/components/autofill/core/browser/personal_data_manager.h
[modify] https://crrev.com/23f01b8469b9a91180398faf2ac9feb687b2ef6e/components/autofill/core/browser/personal_data_manager_unittest.cc
[modify] https://crrev.com/23f01b8469b9a91180398faf2ac9feb687b2ef6e/components/autofill/core/browser/webdata/autocomplete_syncable_service.cc
[modify] https://crrev.com/23f01b8469b9a91180398faf2ac9feb687b2ef6e/components/autofill/core/browser/webdata/autofill_data_type_controller_unittest.cc
[modify] https://crrev.com/23f01b8469b9a91180398faf2ac9feb687b2ef6e/components/autofill/core/browser/webdata/autofill_profile_syncable_service.cc
[modify] https://crrev.com/23f01b8469b9a91180398faf2ac9feb687b2ef6e/components/autofill/core/browser/webdata/autofill_wallet_metadata_syncable_service.cc
[modify] https://crrev.com/23f01b8469b9a91180398faf2ac9feb687b2ef6e/components/autofill/core/browser/webdata/autofill_wallet_metadata_syncable_service_unittest.cc
[modify] https://crrev.com/23f01b8469b9a91180398faf2ac9feb687b2ef6e/components/autofill/core/browser/webdata/autofill_wallet_syncable_service.cc
[modify] https://crrev.com/23f01b8469b9a91180398faf2ac9feb687b2ef6e/components/autofill/core/browser/webdata/autofill_webdata_backend.h
[modify] https://crrev.com/23f01b8469b9a91180398faf2ac9feb687b2ef6e/components/autofill/core/browser/webdata/autofill_webdata_backend_impl.cc
[modify] https://crrev.com/23f01b8469b9a91180398faf2ac9feb687b2ef6e/components/autofill/core/browser/webdata/autofill_webdata_backend_impl.h
[modify] https://crrev.com/23f01b8469b9a91180398faf2ac9feb687b2ef6e/components/autofill/core/browser/webdata/autofill_webdata_service.cc
[modify] https://crrev.com/23f01b8469b9a91180398faf2ac9feb687b2ef6e/components/autofill/core/browser/webdata/autofill_webdata_service.h
[modify] https://crrev.com/23f01b8469b9a91180398faf2ac9feb687b2ef6e/components/autofill/core/browser/webdata/autofill_webdata_service_observer.h
[modify] https://crrev.com/23f01b8469b9a91180398faf2ac9feb687b2ef6e/components/browser_sync/browser/profile_sync_service_autofill_unittest.cc

Status: Fixed (was: Started)
Cc: ranjitkan@chromium.org
Labels: Needs-Feedback
Could someone please help us in detail with the steps so that test team can recheck (if required) the issue.

Thanks.!
So, the problem is that (prior to this fix) the dedupe would run, stamp the prefs as "already run for this version", and the sync would come along and undo the dedupe.

That once-per-major-version stamp (the "autofill.last_version_deduped" entry in the Preferences file) seems to make this difficult to test with the official binaries.

I'm investigating this further to find a good process for this. I'll try to post an update later today.

Stay tuned...

Install M-52, sign in and enable sync with the default settings. Preferably using a new gaia account.

Submit forms to create two autofill profiles that differ in name only (go/autofill-smoke may be of help here). Do not edit the profiles using the autofill settings UI (this marks them as Verified, which is not what we want).

Close Chrome and edit the database manually to make the names match, so that the profiles are duplicates. You can use...

   sqlitebrowser "<user-data-dir>/<chrome-profile>/Web Data"  # Fix the path!

... to explore and edit the database.

Verify that chrome://settings/autofill shows the two identical profiles. Be sure to CANCEL out of the edit screen, if you peruse in detail.

Run latest M-53 against the same user-data-dir (or install it to another machine and enable sync).

The dedupe routine should run, post-post sync start-up, and the duplicate autofill profiles should be merged/deleted, leaving a single profile. Which can
be verified in chrome://settings/autofill

There should also be a last_version_deduped value added to the Preferences file, with a value of 53.

Sign in to add a comment