Skip to content
Commit 3241a936 authored by David Roger's avatar David Roger Committed by Chromium LUCI CQ
Browse files

[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: default avatarAlex Ilin <alexilin@chromium.org>
Commit-Queue: David Roger <droger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#859740}
parent 6d9ed4ed
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment