diff options
author | zelidrag@chromium.org <zelidrag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-04 23:53:25 +0000 |
---|---|---|
committer | zelidrag@chromium.org <zelidrag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-04 23:53:25 +0000 |
commit | 2a0ff28378173300b81b2874736c30a6c48d0029 (patch) | |
tree | 0eb6c0bab63a475a355f6ae73cea78219a789504 /google_apis/gaia/oauth2_access_token_fetcher.h | |
parent | 64c15a3b3ac83e94f23c4e569e28f31bf95175ca (diff) | |
download | chromium_src-2a0ff28378173300b81b2874736c30a6c48d0029.zip chromium_src-2a0ff28378173300b81b2874736c30a6c48d0029.tar.gz chromium_src-2a0ff28378173300b81b2874736c30a6c48d0029.tar.bz2 |
Handling of multiple concurrent requests from different clients in OAuth2TokenService
BUG=268937
TEST=OAuth2TokenServiceTest.SameScopesRequestedForDifferentClients
TBR=tim (for chrome/browser/sync)
Review URL: https://chromiumcodereview.appspot.com/22581003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221303 0039d316-1c4b-4281-b951-d872f2087c98
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, |