UnifiedConsentService: fix Sync feature state checks
This includes two fixes: 1) In OnStateChanged, check CanSyncFeatureStart instead of checking for absence of disable reasons. CanSyncFeatureStart also implies no disable reasons, but additionally checks that the syncing account is primary, meaning that Sync the *feature* can start, not just the transport layer. 2) In UpdateSettingsForMigration, when determining the UKM state, add a check for IsSyncFeatureEnabled. The reason is that GetChosenDataTypes returns "all types" by default, even if Sync is disabled, or only the transport layer is running. So the old code could result in some false positives. This change is analogous to https://crrev.com/c/1343369. Bug: 907027 Change-Id: Ie5eaf261b17da072dcd2cb8a596a7342e2fc8192 Reviewed-on: https://chromium-review.googlesource.com/c/1346131Reviewed-by:Thomas Tangl <tangltom@chromium.org> Commit-Queue: Marc Treib <treib@chromium.org> Cr-Commit-Position: refs/heads/master@{#610038}
Showing
Please register or sign in to comment