• Ryan Hansberry's avatar
    [CrOS Multidevice] Fix crash in Tether. · c553b5e2
    Ryan Hansberry authored
    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: default avatarJames Hawkins <jhawkins@chromium.org>
    Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
    Commit-Queue: Ryan Hansberry <hansberry@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#572309}
    c553b5e2
tether_service.cc 24.9 KB