[CrOS Multidevice] Fix crash in Tether.
This issue manifested as all new account creations on Chrome OS crashing. It was caused by the local device metadata being returned by DeviceSyncClient not yet being initialized. DeviceSyncClient now internally keeps track of whether it is "ready", that is, whether its local device metadata and synced devices are available yet. Only once it has loaded both sets of data will it mark itself as "ready", and inform clients appropriately. This change also ensures that DeviceSyncClient's Observer callbacks, OnEnrollmentFinished() and OnNewDevicesSynced(), are not called until DeviceSyncClient is ready. R=jhawkins@chromium.org, khorimoto@chromium.org Bug: 856406 Change-Id: Idb6fdf123d4d90883f67bb1e88a617004926207e Reviewed-on: https://chromium-review.googlesource.com/1121351Reviewed-by:James Hawkins <jhawkins@chromium.org> Reviewed-by:
Kyle Horimoto <khorimoto@chromium.org> Commit-Queue: Ryan Hansberry <hansberry@chromium.org> Cr-Commit-Position: refs/heads/master@{#572309}
Showing
Please register or sign in to comment