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

Unified Diff: chrome/browser/signin/signin_manager.cc

Issue 19567004: Convert SigninTracker to use OAuth2TokenService notifications (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 3 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 | « chrome/browser/signin/fake_profile_oauth2_token_service.cc ('k') | chrome/browser/signin/signin_tracker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/signin/signin_manager.cc
diff --git a/chrome/browser/signin/signin_manager.cc b/chrome/browser/signin/signin_manager.cc
index dd36ea335454541393b184234fee80a9cd0b8367..4ff90c910ac95ce4d4b578a2fb4444514229016a 100644
--- a/chrome/browser/signin/signin_manager.cc
+++ b/chrome/browser/signin/signin_manager.cc
@@ -554,8 +554,12 @@ void SigninManager::CompletePendingSignin() {
token_service->StartFetchingTokens();
// If we have oauth2 tokens, tell token service about them so it does not
- // need to fetch them again.
+ // need to fetch them again. Its important that the authenticated name has
+ // already been set before sending the oauth2 token to the token service.
+ // Some token service listeners will query the authenticated name when they
+ // receive the token available notification.
if (!temp_oauth_login_tokens_.refresh_token.empty()) {
+ DCHECK(!GetAuthenticatedUsername().empty());
token_service->UpdateCredentialsWithOAuth2(temp_oauth_login_tokens_);
temp_oauth_login_tokens_ = ClientOAuthResult();
}
« no previous file with comments | « chrome/browser/signin/fake_profile_oauth2_token_service.cc ('k') | chrome/browser/signin/signin_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698