[sync] Post task when registering synthetic trials
SyncClient's implementation can run into an infinite recursion if `RegisterTrustedVaultAutoUpgradeSyntheticFieldTrial()` leads to exercising the factory that constructs SyncServiceImpl. This scenario is known to be reachable on iOS as per linked bug, so the safest and most future-proof approach is to use task-posting to slightly delay the registration of synthetic field trials, which guarantees that the construction of SyncService is completed at the time. Change-Id: I0c0ed22fdce2479e444640caad1c896a7d4021ea Fixed: 345514506 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5607959 Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com> Reviewed-by:Ankush Singh <ankushkush@google.com> Commit-Queue: Mikel Astiz <mastiz@chromium.org> Cr-Commit-Position: refs/heads/main@{#1312774}
Loading