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

Unified Diff: chrome/browser/chromeos/login/signin/oauth2_login_manager.h

Issue 473153002: Inline sign in extracts gaia id from HTTP header and seeds account tracker (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 2 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
Index: chrome/browser/chromeos/login/signin/oauth2_login_manager.h
diff --git a/chrome/browser/chromeos/login/signin/oauth2_login_manager.h b/chrome/browser/chromeos/login/signin/oauth2_login_manager.h
index 9543f5df58b0be97b50d8b17d9e54d7eefacdd43..ab9ccdfd5c7f59f39a4d6649f0c0abca3c8e7354 100644
--- a/chrome/browser/chromeos/login/signin/oauth2_login_manager.h
+++ b/chrome/browser/chromeos/login/signin/oauth2_login_manager.h
@@ -149,8 +149,9 @@ class OAuth2LoginManager : public KeyedService,
// gaia::GaiaOAuthClient::Delegate overrides.
void OnRefreshTokenResponse(const std::string& access_token,
- int expires_in_seconds) override;
- void OnGetUserEmailResponse(const std::string& user_email) override;
+ int expires_in_seconds) override;
+ void OnGetUserInfoResponse(
+ scoped_ptr<base::DictionaryValue> user_info) override;
void OnOAuthError() override;
void OnNetworkError(int response_code) override;
@@ -180,12 +181,15 @@ class OAuth2LoginManager : public KeyedService,
// Records |refresh_token_| to token service. The associated account id is
// assumed to be the primary account id of the user profile. If the primary
- // account id is not present, GetAccountIdOfRefreshToken will be called to
- // retrieve the associated account id.
+ // account id is not present, GetAccountInfoOfRefreshToken will be called to
+ // retrieve the associated account info.
void StoreOAuth2Token();
- // Get the account id corresponding to the specified refresh token.
- void GetAccountIdOfRefreshToken(const std::string& refresh_token);
+ // Get the account info corresponding to the specified refresh token.
+ void GetAccountInfoOfRefreshToken(const std::string& refresh_token);
+
+ // Update the token service and inform listeners of a new refresh token.
+ void UpdateCredentials(const std::string& account_id);
// Attempts to fetch OAuth2 tokens by using pre-authenticated cookie jar from
// provided |auth_profile|.
@@ -230,7 +234,7 @@ class OAuth2LoginManager : public KeyedService,
scoped_ptr<OAuth2TokenFetcher> oauth2_token_fetcher_;
scoped_ptr<OAuth2LoginVerifier> login_verifier_;
- scoped_ptr<gaia::GaiaOAuthClient> account_id_fetcher_;
+ scoped_ptr<gaia::GaiaOAuthClient> account_info_fetcher_;
// OAuth2 refresh token.
std::string refresh_token_;

Powered by Google App Engine
This is Rietveld 408576698