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

Issue 878858 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 26
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Switch PersonalDataManager storage based on Sync feature state

Project Member Reported by feuunk@google.com, Aug 29

Issue description

PersonalDataManager has an account storage and a profile storage. We should use the profile storage when full sync (AKA sync the feature) is enabled, and the account storage otherwise.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Aug 30

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

commit 9ef7e0e855bb5f39a3c32daf3b988d731d4a47b4
Author: Florian Uunk <feuunk@chromium.org>
Date: Thu Aug 30 12:54:32 2018

Switch PersonalDataManager storage based on sync

PersonalDataManager now checks the sync feature state in its
OnStateChanged method, and if the sync the feature is not on, it will
use the ephemeral account storage, instead of the persistent store.

Note that we previously wanted to use the USS bridge as a source of this
information, instead of observing the sync service directly. However,
using that approach means that all updates need to switch from the db
thread to the main thread. That could mean that while an account switch
update is underway from the bridge to PDM, the PDM is still committing
changes to the database for the previous account.

A cleaner fix may be to do the entire switch on the database thread, at
which point PDM only needs to be notified that the storage changed.

Bug:  878858 
Change-Id: I6581eb45f7e3510142142e25ede5e8b296fcaf9d
Reviewed-on: https://chromium-review.googlesource.com/1194126
Commit-Queue: Sebastien Seguin-Gagnon <sebsg@chromium.org>
Reviewed-by: Sebastien Seguin-Gagnon <sebsg@chromium.org>
Reviewed-by: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#587536}
[modify] https://crrev.com/9ef7e0e855bb5f39a3c32daf3b988d731d4a47b4/chrome/browser/autofill/personal_data_manager_factory.cc
[modify] https://crrev.com/9ef7e0e855bb5f39a3c32daf3b988d731d4a47b4/components/autofill/core/browser/personal_data_manager.cc
[modify] https://crrev.com/9ef7e0e855bb5f39a3c32daf3b988d731d4a47b4/components/autofill/core/browser/personal_data_manager.h
[modify] https://crrev.com/9ef7e0e855bb5f39a3c32daf3b988d731d4a47b4/components/autofill/core/browser/personal_data_manager_unittest.cc
[modify] https://crrev.com/9ef7e0e855bb5f39a3c32daf3b988d731d4a47b4/components/autofill/core/browser/test_sync_service.cc
[modify] https://crrev.com/9ef7e0e855bb5f39a3c32daf3b988d731d4a47b4/components/autofill/core/browser/test_sync_service.h
[modify] https://crrev.com/9ef7e0e855bb5f39a3c32daf3b988d731d4a47b4/components/browser_sync/profile_sync_service_autofill_unittest.cc

Status: Fixed (was: Started)

Sign in to add a comment