Don't show Signin promo in NTP when the account cache isn't ready
User can hit ANR on NTP because Chrome wants to display a Signin promo. Signin promo requires a list of Android accounts on a device to display the user name and the profile picture. The promo view is built synchronously meaning that the UI thread may be blocked waiting for a list of accounts. The list of accounts is requested through the AccountManagerFacade that maintains the accounts cache. As soon as this cache is populated, it's safe to synchronously request the list of accounts. This CL adds an additional check to SignInPromo to not build the promo view until the cache is populated. The AccountsChangeObserver will notify the SignInPromo when the cache is built. Bug: 971618 Change-Id: I3e719bd16ceb077933de410e403d6f4692cf4578 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1710575Reviewed-by:Theresa <twellington@chromium.org> Reviewed-by:
Boris Sazonov <bsazonov@chromium.org> Commit-Queue: Alex Ilin <alexilin@chromium.org> Cr-Commit-Position: refs/heads/master@{#688456}
Showing
Please register or sign in to comment