[Android] Add account list cache to AccountManagerFacade
Getting account list can take a while, especially in edge cases like after Google Play Services update. This CL addresses this by adding a cache for account list. Accessing the cache is cheap, so getGoogleAccounts() and similar methods can now be safely invoked from UI thread. The only edge case for getGoogleAccounts() is a time period before the cache is populated after Chrome startup. In this case getGoogleAccounts() will wait until the cache is populated. If this waiting occurs on UI thread, it will record waiting time in Signin.AndroidPopulateAccountCacheWaitingTime histogram. Bug: 698258, 759798 Change-Id: I1e9b481cb4ccf4c24ff363fb7f4214d9d8c571f7 Reviewed-on: https://chromium-review.googlesource.com/675684Reviewed-by:Bernhard Bauer <bauerb@chromium.org> Reviewed-by:
Jesse Doherty <jwd@chromium.org> Reviewed-by:
Pavel Yatsuk <pavely@chromium.org> Commit-Queue: Boris Sazonov <bsazonov@chromium.org> Cr-Commit-Position: refs/heads/master@{#506707}
Showing
Please register or sign in to comment