Chromium Code Reviews| Index: chrome/browser/chromeos/login/oauth2_login_manager.cc |
| diff --git a/chrome/browser/chromeos/login/oauth2_login_manager.cc b/chrome/browser/chromeos/login/oauth2_login_manager.cc |
| index 314708c3c5e70b6866850d7a8bd6299e29d356dd..ccc2034d3ff527ff80e0521073760161f9a61a57 100644 |
| --- a/chrome/browser/chromeos/login/oauth2_login_manager.cc |
| +++ b/chrome/browser/chromeos/login/oauth2_login_manager.cc |
| @@ -149,7 +149,10 @@ void OAuth2LoginManager::Observe( |
| TokenServiceFactory::GetForProfile(user_profile_); |
| switch (type) { |
| case chrome::NOTIFICATION_TOKEN_LOADING_FINISHED: { |
| - refresh_token_ = token_service->GetOAuth2LoginRefreshToken(); |
| + if (restore_from_auth_cookies_ && |
| + !token_service->GetOAuth2LoginRefreshToken().empty()) { |
| + refresh_token_ = token_service->GetOAuth2LoginRefreshToken(); |
| + } |
| // TODO(zelidrag): Figure out why just getting GaiaConstants::kGaiaService |
|
zel
2013/01/23 16:44:50
nit: please remove this comment while you are here
Joao da Silva
2013/01/23 16:50:37
Done.
|
| // token does not do the trick here. |
| RestoreSessionCookies(); |