diff options
Diffstat (limited to 'google_apis/gaia/oauth2_access_token_fetcher.h')
-rw-r--r-- | google_apis/gaia/oauth2_access_token_fetcher.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/google_apis/gaia/oauth2_access_token_fetcher.h b/google_apis/gaia/oauth2_access_token_fetcher.h index 11ac6ea..e9e1520 100644 --- a/google_apis/gaia/oauth2_access_token_fetcher.h +++ b/google_apis/gaia/oauth2_access_token_fetcher.h @@ -26,6 +26,10 @@ class URLRequestContextGetter; class URLRequestStatus; } +namespace policy { + class UserPolicySigninServiceTest; +} + // Abstracts the details to get OAuth2 access token token from // OAuth2 refresh token. // See "Using the Refresh Token" section in: @@ -94,6 +98,9 @@ class OAuth2AccessTokenFetcher : public net::URLFetcherDelegate { std::string* access_token, int* expires_in); + // Resets |last_fetcher_id_| to 0. + static void ResetLastFetcherIdForTest(); + // State that is set during construction. OAuth2AccessTokenConsumer* const consumer_; net::URLRequestContextGetter* const getter_; @@ -106,7 +113,12 @@ class OAuth2AccessTokenFetcher : public net::URLFetcherDelegate { std::string refresh_token_; std::vector<std::string> scopes_; + // The last fetcher id. + static int last_fetcher_id_; + friend class OAuth2AccessTokenFetcherTest; + friend class OAuth2TokenServiceTest; + friend class policy::UserPolicySigninServiceTest; FRIEND_TEST_ALL_PREFIXES(OAuth2AccessTokenFetcherTest, ParseGetAccessTokenResponse); FRIEND_TEST_ALL_PREFIXES(OAuth2AccessTokenFetcherTest, |