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

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

Issue 11991002: Merge 176800 (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1364/src/
Patch Set: Created 7 years, 11 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/resources/chromeos/login/user_pod_row.js ('k') | chrome/browser/signin/token_service.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
===================================================================
--- chrome/browser/signin/signin_manager.cc (revision 177312)
+++ chrome/browser/signin/signin_manager.cc (working copy)
@@ -127,9 +127,15 @@
TokenService* token_service = TokenServiceFactory::GetForProfile(profile_);
if (token_service) {
token_service->Initialize(GaiaConstants::kChromeSource, profile_);
+ // ChromeOS will kick off TokenService::LoadTokensFromDB from
+ // OAuthLoginManager once the rest of the Profile is fully initialized.
+ // Starting it from here would cause OAuthLoginManager mismatch the origin
+ // of OAuth2 tokens.
+#if !defined(OS_CHROMEOS)
if (!authenticated_username_.empty()) {
token_service->LoadTokensFromDB();
}
+#endif
}
if (!user.empty() && !IsAllowedUsername(user)) {
// User is signed in, but the username is invalid - the administrator must
@@ -511,7 +517,7 @@
// If we have oauth2 tokens, tell token service about them so it does not
// need to fetch them again.
if (!temp_oauth_login_tokens_.refresh_token.empty()) {
- token_service->OnClientOAuthSuccess(temp_oauth_login_tokens_);
+ token_service->UpdateCredentialsWithOAuth2(temp_oauth_login_tokens_);
temp_oauth_login_tokens_ = ClientOAuthResult();
}
}
« no previous file with comments | « chrome/browser/resources/chromeos/login/user_pod_row.js ('k') | chrome/browser/signin/token_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698