ProfileSyncService cleanup: Remove platform_sync_allowed_provider_

ProfileSyncService::platform_sync_allowed_provider_ was a callback that
returned whether Android's "Master Sync" toggle is enabled, and so Sync
shouldn't start up. However, PSS didn't know when the value changed, so
the callback was kinda useless, and PSS could easily get into an
inconsistent state (where there is a disable reason, but Sync is still
running). Things were working out in practice only because the Android
UI code also called RequestStart/Stop as necessary.
So, since PSS needs change notifications anyway, let's make that
explicit: This CL replaces the callback by a bool, which can be set

Bug: 867901
Change-Id: I5b7e9f4657d1f565d9643984eb52ec1df26b5c90
Reviewed-by: Mikel Astiz <>
Commit-Queue: Marc Treib <>
Cr-Commit-Position: refs/heads/master@{#599195}
6 files changed