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

Issue 631141 link

Starred by 3 users

Issue metadata

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



Sign in to add a comment

[Autofill] AutofillProfileUseDatesFix is clobbered by sync

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

Issue description

The use-date fix replaces invalid autofill profile last-use dates (prior to M53, the use-date at creation was set to 0). It is currently run when the autofill profile data is first loaded upon chrome start. This happens before sync, if enabled, has started. Unfortunately, when sync starts, it overwrites the fixed last-use dates for any profiles already represented in the sync data stream.

The fix is to run the fix after sync has started, if sync is enabled.
 

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

Labels: OS-All
Project Member

Comment 2 by sheriffbot@chromium.org, Jul 26 2016

Labels: -M-53 M-54 MovedFrom-53
Moving this nonessential bug to the next milestone.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

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

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

commit fde6213417d148d604e67d687ac8259cc60ea90d
Author: rogerm <rogerm@chromium.org>
Date: Tue Jul 26 18:37:30 2016

Apply autofill profile use-date fix after sync starts.

The use-date fix replaces invalid autofill profile last-use dates (prior
to M53, the use-date at creation was set to 0). It is currently run when
the autofill profile data is first loaded upon chrome start. This
happens before sync, if enabled, has started. Unfortunately, when sync
starts, it overwrites the fixed last-use dates for any profiles already
represented in the sync data stream.

This CL moves the invocation of...

  autofill::PersonalDataManager::ApplyProfileUseDatesFix()

... to be invoked either upon determining that sync is not enabled
(and will therefore not clobber the fixes) or upon notification
that sync has started (initial sync is complete, and sync is
ready to accept and propagate our fixes).

BUG= 631141 
R=mathp@chromium.org, sebsg@chromium.org, zea@chromium.org

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

[modify] https://crrev.com/fde6213417d148d604e67d687ac8259cc60ea90d/components/autofill/core/browser/personal_data_manager.cc
[modify] https://crrev.com/fde6213417d148d604e67d687ac8259cc60ea90d/components/autofill/core/browser/personal_data_manager_unittest.cc
[modify] https://crrev.com/fde6213417d148d604e67d687ac8259cc60ea90d/components/browser_sync/browser/profile_sync_service_autofill_unittest.cc

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

Labels: Merge-Request-53

Comment 5 by dimu@chromium.org, Jul 27 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 6 by rogerm@chromium.org, Jul 27 2016

For posterity, here are the test instructions.

(I don't think manual verification is required.)

1. Install M-51 or earlier, sign in, and enable sync with the default settings.
   You can also use M-52, but you'll need to edit the DB to "fake" the bug.
2. Submit a form to create an autofill profile (http://go/autofill-smoke)
3. Shutdown Chrome completely
4. Use [sqlitebrowser "<user-data-dir>/<profile>/Web Data"] to verify (or
   modify) the use_date field of the autofill_profiles table is 0.
5. Run M-53 for the same user-data dir (or for the same signed in and
   syncing user).
6. Shutdown Chrome completely.
7. Use sqlitebrowser to verify that the use_data field is now a unixtime value
   representing approx. 2 weeks before the current time.
Project Member

Comment 7 by bugdroid1@chromium.org, Jul 27 2016

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

commit 68d68c77ceb103b17bc4b305b1ba0a65666c4985
Author: Mathieu Perreault <mathp@chromium.org>
Date: Wed Jul 27 17:52:12 2016

[Merge M53] Apply autofill profile use-date fix after sync starts.

The use-date fix replaces invalid autofill profile last-use dates (prior
to M53, the use-date at creation was set to 0). It is currently run when
the autofill profile data is first loaded upon chrome start. This
happens before sync, if enabled, has started. Unfortunately, when sync
starts, it overwrites the fixed last-use dates for any profiles already
represented in the sync data stream.

This CL moves the invocation of...

  autofill::PersonalDataManager::ApplyProfileUseDatesFix()

... to be invoked either upon determining that sync is not enabled
(and will therefore not clobber the fixes) or upon notification
that sync has started (initial sync is complete, and sync is
ready to accept and propagate our fixes).

BUG= 631141 
R=mathp@chromium.org, sebsg@chromium.org, zea@chromium.org

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

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

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

[modify] https://crrev.com/68d68c77ceb103b17bc4b305b1ba0a65666c4985/components/autofill/core/browser/personal_data_manager.cc
[modify] https://crrev.com/68d68c77ceb103b17bc4b305b1ba0a65666c4985/components/autofill/core/browser/personal_data_manager_unittest.cc
[modify] https://crrev.com/68d68c77ceb103b17bc4b305b1ba0a65666c4985/components/browser_sync/browser/profile_sync_service_autofill_unittest.cc

Comment 8 by rogerm@chromium.org, Aug 11 2016

Status: Fixed (was: Started)

Sign in to add a comment