• Marc Treib's avatar
    PeopleHandler: (re)start Sync-the-feature if necessary · f4adb161
    Marc Treib authored
    If Sync-the-feature is disabled because of a "Reset Sync" action on
    the dashboard, then the Sync entry in chrome://settings shows an error
    message, and clicking on it should re-enable Sync.
    The UI logic checks for this state via SyncService::IsEngineInitialized.
    However, if Sync-the-transport is running, then the engine can be
    initialized even though Sync-the-feature is still disabled. In this
    situation, the user has no way to turn Sync back on.
    
    This CL fixes this by adding a check for DISABLE_REASON_USER_CHOICE
    which on desktop corresponds to a dashboard clear. It also adds tests.
    
    Bug: 881934
    Change-Id: I6216564ac6fbb9efff988a2ebd09d532c82985cd
    Reviewed-on: https://chromium-review.googlesource.com/1224379Reviewed-by: default avatarScott Chen <scottchen@chromium.org>
    Commit-Queue: Marc Treib <treib@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#591141}
    f4adb161
people_handler.h 10.4 KB