Reland "[unified-consent] Refactor migration code and add settings updates"
This is a reland of 28ac1ad7 The were two problems: - There was a call to internal::GetUnifiedConsentFeatureState() in UnifiedConsentService::ShouldShowConsentBump(). Instead of using this function, the check for the feature state should happen on the platform level. This is already done on Desktop, so removing the call will resolve the problem. - The initialization of scoped_unified_consent_ in the unit tests had a bug. When the variable was reset with a new value, the new value was created before the old one was deleted which led to a memory leak. Original change's description: > [unified-consent] Refactor migration code and add settings updates > > The migration code in the UnifiedConsentService is refactored: > - The migration state IN_PROGRESS_SHOULD_SHOW_CONSENT_BUMP is > extracted to it's own pref kShouldShowUnifiedConsentBump. > - The migration state kInProgressWaitForSyncInit is introduced > to be able to update the settings for migration when sync is > initialized. > > Additional changes: > - ShouldShowConsentBump only returns true if the consent bump > feature is enabled. > - The rollback enables sync-everything now also when the user is > not syncing USER_EVENTS (which is disabled during the migration). > > Users that previously had the unified consent feature enabled and > for which ShouldShowConsentBump=true, will not be shown the consent > bump anymore after this CL is landed. This will only affect a few > users on Canary and Dev. > > Bug: 863932 > Change-Id: I211805f9059cd26056ed81d01ff19470b8caed3c > Reviewed-on: https://chromium-review.googlesource.com/1172690 > Reviewed-by: David Roger <droger@chromium.org> > Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org> > Commit-Queue: Thomas Tangl <tangltom@chromium.org> > Cr-Commit-Position: refs/heads/master@{#584341} TBR=ellyjones@chromium.org TBR=droger@chromium.org Bug: 863932 Change-Id: Ic041ac99da729d072f49fc9aa6adfe5624fc089e Reviewed-on: https://chromium-review.googlesource.com/1180921 Commit-Queue: Thomas Tangl <tangltom@chromium.org> Reviewed-by:Thomas Tangl <tangltom@chromium.org> Cr-Commit-Position: refs/heads/master@{#584451}
Showing
This diff is collapsed.
This diff is collapsed.
Please register or sign in to comment