commit | 8f92feb2de04e3fca8801732848f0085372fa043 | [log] [tgz] |
---|---|---|
author | Colin Blundell <blundell@chromium.org> | Tue Oct 09 10:56:52 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Tue Oct 09 10:56:52 2018 |
tree | b141eb545eff1ab948191c23ab64d42546438644 | |
parent | 53336cc1f18e225fb098871b023b9bdfad0c8733 [diff] |
IdentityManager: Eliminate usage of GetPrimaryAccountInfo().account_id Before https://chromium-review.googlesource.com/c/1264162 landed, the recommended equivalent to SigninManagerBase::GetAuthenticatedAccountId() was IdentityManager::GetPrimaryAccountInfo().account_id. However, as detailed in crbug.com/892553, this replacement was actually potentially problematic: IdentityManager::GetPrimaryAccountInfo() can return an empty struct in cases where SigninManagerBase::GetAuthenticatedAccountId() would return a valid ID (e.g., the refresh token of the primary account was revoked without the user signing out). This CL ports all consumers to use IdentityManager::GetPrimaryAccountId(), which is a strict equivalent to SigninManagerBase::GetAuthenticatedAccountId(). I looked through git history for all the production consumers being converted in this CL to verify that they were all either (1) ported from using SigninManagerBase::GetAuthenticatedAccountId(), or (2) developed from scratch using IdentityManager. In the latter case, this change is correct as this API is now the canonical way to get the primary account ID. TBR=jochen@chromium.org Bug: 892553 Change-Id: I8c1718fadb6c443f18d1bcbe1dae475465f5d914 Reviewed-on: https://chromium-review.googlesource.com/c/1269729 Reviewed-by: Colin Blundell <blundell@chromium.org> Reviewed-by: Sylvain Defresne <sdefresne@chromium.org> Commit-Queue: Colin Blundell <blundell@chromium.org> Cr-Commit-Position: refs/heads/master@{#597875}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .