This class will be used to obtain diagnostics about IdentityManager
internals. In this CL we're adding a pure interface and an
implementation backed by unit tests.
It has the following methods and correspondencies:
* OAuth2TokenServiceDelegate::LoadCredentialsState
GetDetailedStateOfLoadingOfRefreshTokens() corresponds to
OAuth2TokenServiceDelegate::load_credentials_state()
* GetDelayBeforeMakingAccessTokenRequests() corresponds to
ProfileOAuth2TokenService::GetDelegateBackoffEntry()::GetTimeUntilRelease()
* GetDelayBeforeMakingCookieRequests() corresponds to
GaiaCookieManagerService::GetBackoffEntry()::GetTimeUntilRelease()
In order to make the unit test work, BackoffEntry support had to be added to
FakeOAuth2TokenServiceDelegate as the current code does not need to modify it
(it does not perform retries). A new API to simulate cookie merge session
failures had to be added as well to IdentityTestEnvironment.
Bug: 926833
Change-Id: I2f1fedccd0c69e6a8de2bd307e6c32b83f76fd84
Reviewed-on: https://chromium-review.googlesource.com/c/1461121
Commit-Queue: Sergio Villar <svillar@igalia.com>
Reviewed-by: Mihai Sardarescu <msarda@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#634311}