[signin] Fix IdentityManager shutdown sequence
The IdentityManager still uses the SigninClient after it was shut down, which is incorrect and causing crashes. On top of this, for historical reasons, several fields of the IdentityManager: - AccountTrackerService - AccountFetcherService - ProfileOAuth2TokenService - GaiaCookieManagerService were doing a 2-phases shutdown (with a Shutdown() method), because they were keyed services in the past. However, this 2-phases shutdown also had bugs, because these classes were still using the SigninClient after their Shutdown() method was called. This CL addresses these two problems by: - removing the Shutdown() methods on the IdentityManager fields. The logic is now merged in the destructor. - destroys these objects in IdentityManager::Shutdown() to guarantee that they are not using the SigninClient after this point. This fixes the shutdown sequence, and also simplifies the API by removing the 2-phases shutdown which is more complex and error prone. Fixed: 1173926 Change-Id: Ic355062bf80479a0688bb8f18fe42f6088c94bed Cq-Do-Not-Cancel-Tryjobs: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2731512 Reviewed-by:Alex Ilin <alexilin@chromium.org> Commit-Queue: David Roger <droger@chromium.org> Cr-Commit-Position: refs/heads/master@{#859740}
Loading
Please register or sign in to comment