[Dice] Avoid showing the sync confirmation dialog before sync engine starts.

In pre-DICE, the sync confirmation dialog was always shown after the
accounts were added to the Gaia cookies. This took several seconds
allowing the sync engine to initialize and check whether sync was
allowed for the given account.

When DICE enabled, the sync confirmation dialog should only be shown
after sync has been initialized or failed to be initialized. This allows
us to make sure that the policy to enable or disable sync for the given
account is checked before displaying the sync confirmation dialog.

BUG = 812546
TBR=msarda@chromium.org

(cherry picked from commit 859bc0e66cd10599ce7a96517474fe22f57935cf)

Change-Id: Ic414cd8eb5a810a1ff0827526361b10f8e76210b
Reviewed-on: https://chromium-review.googlesource.com/921741
Reviewed-by: David Roger <droger@chromium.org>
Reviewed-by: Nicolas Zea <zea@chromium.org>
Commit-Queue: Mihai Sardarescu <msarda@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#537348}
Reviewed-on: https://chromium-review.googlesource.com/928404
Reviewed-by: Mihai Sardarescu <msarda@chromium.org>
Cr-Commit-Position: refs/branch-heads/3325@{#530}
Cr-Branched-From: bc084a8b5afa3744a74927344e304c02ae54189f-refs/heads/master@{#530369}
2 files changed