Simplify AuthenticationService implementation
Change internal implementation of two methods of AuthenticationService to remove unnecessary allocations. 1. AuthenticationService::MigrateAccountsStoredInPrefsIfNeeded is only interested in whether the system has stored refresh token for an account by account_id, so use HasAccountWithRefreshToken instead of fetching the whole AccountInfo 2. AuthenticationService::ReloadCredentialsFromIdentities only need to check whether the system has a primary account set, and is not interested in the email address, so use IsAuthenticated instead of GetAuthenticatedUserEmail Bug: none Change-Id: If5de15711ef2d2d96dc935162b11aa17c4b245fe Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1569122 Commit-Queue: Sylvain Defresne <sdefresne@chromium.org> Reviewed-by:Mihai Sardarescu <msarda@chromium.org> Cr-Commit-Position: refs/heads/master@{#652542}
Showing
Please register or sign in to comment