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

Issue 820625 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

In some situations, user's preferred sync datatypes are incorrectly populated

Project Member Reported by scottchen@chromium.org, Mar 9 2018

Issue description

In some places throughout sync codes where the datatype values on disk would be overridden incorrectly. 

For example: In SyncSetupService::SetDataTypeEnabled[1], the code here would grab values from GetPreferredDatatypes (which would include all datatypes as "preferred" if sync_everything is on), and then overrides whatever the user actually had selected when sync_everything was off with them.

[1]https://cs.chromium.org/chromium/src/ios/chrome/browser/sync/sync_setup_service.cc?type=cs&q=onUserChoseDatatypes&sq=package:chromium&l=63-71

mastiz@ suggested the following:

we could change the returned type from ModelTypeSet to something else, a datatype that:
- Internally contains a sync_everything and ModelTypeSet.
- Allows verifying if a datatype is effectively selected (honors sync_everything too).
- Returns, if we really need to (I hope not), the ModelTypeSet that is currently returned by GetPreferredDatatypes() (honors sync_everything).
- Allows mutations (as we discussed earlier in the patch, now wrapped in this class).
- Is accepted by OnUserChoseDatatypes.

This has the advantage that we can accommodate as many lookups or writes as we wish without polluting the various interfaces.


(Note: This discussion happened while addressing crbug/815018).

 
Labels: sync-fixit-2018q3
Labels: sync-fixit-2018q4
Cc: treib@chromium.org
Owner: ----
Status: Available (was: Assigned)

Sign in to add a comment