Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(453)

Unified Diff: chrome/common/net/gaia/oauth2_access_token_fetcher.h

Issue 8728038: Allow passing in a list of scopes to the access token fetcher class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/net/gaia/oauth2_access_token_fetcher.h
===================================================================
--- chrome/common/net/gaia/oauth2_access_token_fetcher.h (revision 111883)
+++ chrome/common/net/gaia/oauth2_access_token_fetcher.h (working copy)
@@ -49,7 +49,8 @@
void Start(const std::string& client_id,
const std::string& client_secret,
- const std::string& refresh_token);
+ const std::string& refresh_token,
+ const std::vector<std::string>& scopes);
void CancelRequest();
@@ -74,9 +75,11 @@
// Other helpers.
static GURL MakeGetAccessTokenUrl();
- static std::string MakeGetAccessTokenBody(const std::string& client_id,
- const std::string& client_secret,
- const std::string& refresh_token);
+ static std::string MakeGetAccessTokenBody(
+ const std::string& client_id,
+ const std::string& client_secret,
+ const std::string& refresh_token,
+ const std::vector<std::string>& scopes);
static bool ParseGetAccessTokenResponse(const content::URLFetcher* source,
std::string* access_token);
@@ -91,10 +94,13 @@
std::string client_id_;
std::string client_secret_;
std::string refresh_token_;
+ std::vector<std::string> scopes_;
friend class OAuth2AccessTokenFetcherTest;
FRIEND_TEST_ALL_PREFIXES(OAuth2AccessTokenFetcherTest,
ParseGetAccessTokenResponse);
+ FRIEND_TEST_ALL_PREFIXES(OAuth2AccessTokenFetcherTest,
+ MakeGetAccessTokenBody);
DISALLOW_COPY_AND_ASSIGN(OAuth2AccessTokenFetcher);
};

Powered by Google App Engine
This is Rietveld 408576698