• James Cook's avatar
    chromeos: Fix SplitSettingsSync sync pref migration · 4b2811b1
    James Cook authored
    Fix a bug where an existing user could auto-update to M85, get
    randomized into the SplitSettingsSync field trial, but end up
    with OS sync disabled. This results in apps, OS preferences,
    Wi-Fi configs and wallpaper not syncing.
    
    The root cause is that when we migrate their per-data-type sync
    prefs (e.g. apps -> OS apps, preferences -> OS preferences) we
    were not enabling the global OS sync feature pref. That pref
    has a "safe" default value of false, so OS sync was never enabled.
    
    This does not affect new users, because they see the OOBE sync
    consent dialog, which enables OS sync if the user opts in.
    
    This CL also fixes migration of the OS wallpaper sync pref, which
    should be set if the user was previously syncing both apps and
    themes.
    
    Some of the regression came from this CL, though migration wasn't
    quite right before either:
    https://chromium-review.googlesource.com/c/chromium/src/+/2197489
    
    We noticed this in M85 because that's the first milestone that
    contains the SplitSettingsSync trial.
    
    Bug: 1116046
    Test: added to unit_tests
    
    Change-Id: Ie40fc2b4bdc194a16b7b756c82f1e2bc258c60ae
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2354724
    Commit-Queue: James Cook <jamescook@chromium.org>
    Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#798307}
    4b2811b1
user_session_manager.cc 94.3 KB