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

Unified Diff: google_apis/gaia/gaia_oauth_client.h

Issue 474473002: Expose full userinfo to callers of GaiaOAuthFetcher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix line ends Created 6 years, 4 months 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
« no previous file with comments | « google_apis/gaia/gaia_constants.cc ('k') | google_apis/gaia/gaia_oauth_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gaia/gaia_oauth_client.h
diff --git a/google_apis/gaia/gaia_oauth_client.h b/google_apis/gaia/gaia_oauth_client.h
index 8e01ef6a83a3bdac0a0fbc8c671304b4382f205b..68eb7665bcd1bdba3ecd7402988e293518db759f 100644
--- a/google_apis/gaia/gaia_oauth_client.h
+++ b/google_apis/gaia/gaia_oauth_client.h
@@ -47,6 +47,9 @@ class GaiaOAuthClient {
virtual void OnGetUserEmailResponse(const std::string& user_email) {}
// Invoked on a successful response to the GetUserId request.
virtual void OnGetUserIdResponse(const std::string& user_id) {}
+ // Invoked on a successful response to the GetUserInfo request.
+ virtual void OnGetUserInfoResponse(
+ scoped_ptr<base::DictionaryValue> user_info) {}
// Invoked on a successful response to the GetTokenInfo request.
virtual void OnGetTokenInfoResponse(
scoped_ptr<base::DictionaryValue> token_info) {}
@@ -104,6 +107,16 @@ class GaiaOAuthClient {
int max_retries,
Delegate* delegate);
+ // Call the userinfo API, returning all the user info associated
+ // with the given access token. The provided access token must have
+ // https://www.googleapis.com/auth/userinfo.profile in its scopes. If
+ // email addresses are also to be retrieved, then
+ // https://www.googleapis.com/auth/userinfo.email must also be specified.
+ // See |max_retries| docs above.
+ void GetUserInfo(const std::string& oauth_access_token,
+ int max_retries,
+ Delegate* delegate);
+
// Call the tokeninfo API, returning a dictionary of response values. The
// provided access token may have any scope, and basic results will be
// returned: issued_to, audience, scope, expires_in, access_type. In
« no previous file with comments | « google_apis/gaia/gaia_constants.cc ('k') | google_apis/gaia/gaia_oauth_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698