Comments

Make sure Sync options are shown after dashboard reset
When Sync is reset from the dashboard, usually the user is also signed
out. However, on ChromeOS or for managed (enterprise) accounts, sign-out
isn't possible. So in this cases, the user can get into a special state
where there is a primary account, but Sync is disabled
(IsSyncRequested() returns false).
Before this CL, PeopleHandler (which implements the Sync settings page)
handled this case poorly: Before actually calling SetSyncRequested(), it
detected a spurious Sync startup error due to IsSyncRequested() being
false, and immediately closed itself again. This means the user had no
way of actually configuring Sync before it started up again.
This CL fixes that by moving the instantiation of SyncStartupTracker
*after* SetSyncRequested. This lets the page open as it should.
Bug: 936886
Change-Id: I362bc9496735ba9ba763e19557859ee4d8ff430c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1520668
Reviewed-by: Thomas Tangl <tangltom@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#641567}