Commit 53d7b87b authored by Julie Jeongeun Kim's avatar Julie Jeongeun Kim Committed by Commit Bot

[s13n] Add CancelAllLoginRequests API to identity_test_utils

This CL implements CancelAllLoginRequests with exposing it through
identity_test_utils.h.

Bug: 926869
Change-Id: Iee7ef6fafbd60d4f04da2d8469b60c3d29b0f538
Reviewed-on: https://chromium-review.googlesource.com/c/1448077
Commit-Queue: Julie Jeongeun Kim <jkim@igalia.com>
Reviewed-by: default avatarColin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#628295}
parent 1e6947e9
...@@ -399,6 +399,9 @@ class IdentityManager : public SigninManagerBase::Observer, ...@@ -399,6 +399,9 @@ class IdentityManager : public SigninManagerBase::Observer,
friend void DisableAccessTokenFetchRetries(IdentityManager* identity_manager); friend void DisableAccessTokenFetchRetries(IdentityManager* identity_manager);
friend void CancelAllOngoingGaiaCookieOperations(
IdentityManager* identity_manager);
friend void SetCookieAccounts( friend void SetCookieAccounts(
IdentityManager* identity_manager, IdentityManager* identity_manager,
network::TestURLLoaderFactory* test_url_loader_factory, network::TestURLLoaderFactory* test_url_loader_factory,
......
...@@ -394,4 +394,8 @@ void DisableAccessTokenFetchRetries(IdentityManager* identity_manager) { ...@@ -394,4 +394,8 @@ void DisableAccessTokenFetchRetries(IdentityManager* identity_manager) {
->set_max_authorization_token_fetch_retries_for_testing(0); ->set_max_authorization_token_fetch_retries_for_testing(0);
} }
void CancelAllOngoingGaiaCookieOperations(IdentityManager* identity_manager) {
identity_manager->GetGaiaCookieManagerService()->CancelAll();
}
} // namespace identity } // namespace identity
...@@ -154,6 +154,9 @@ void UpdatePersistentErrorOfRefreshTokenForAccount( ...@@ -154,6 +154,9 @@ void UpdatePersistentErrorOfRefreshTokenForAccount(
// Disables internal retries of failed access token fetches. // Disables internal retries of failed access token fetches.
void DisableAccessTokenFetchRetries(IdentityManager* identity_manager); void DisableAccessTokenFetchRetries(IdentityManager* identity_manager);
// Cancels all ongoing operations related to the accounts in the Gaia cookie.
void CancelAllOngoingGaiaCookieOperations(IdentityManager* identity_manager);
} // namespace identity } // namespace identity
#endif // SERVICES_IDENTITY_PUBLIC_CPP_IDENTITY_TEST_UTILS_H_ #endif // SERVICES_IDENTITY_PUBLIC_CPP_IDENTITY_TEST_UTILS_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment