| 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..5722ab1730977fe95289fb1a70c654709daf57ab 100644
|
| --- a/chrome/browser/chromeos/login/oauth2_login_manager.cc
|
| +++ b/chrome/browser/chromeos/login/oauth2_login_manager.cc
|
| @@ -149,9 +149,12 @@ void OAuth2LoginManager::Observe(
|
| TokenServiceFactory::GetForProfile(user_profile_);
|
| switch (type) {
|
| case chrome::NOTIFICATION_TOKEN_LOADING_FINISHED: {
|
| - refresh_token_ = token_service->GetOAuth2LoginRefreshToken();
|
| - // TODO(zelidrag): Figure out why just getting GaiaConstants::kGaiaService
|
| - // token does not do the trick here.
|
| + // Don't overwrite the |refresh_token_| if it has already been fetched
|
| + // by the |oauth2_policy_fetcher_|.
|
| + if (restore_from_auth_cookies_ &&
|
| + !token_service->GetOAuth2LoginRefreshToken().empty()) {
|
| + refresh_token_ = token_service->GetOAuth2LoginRefreshToken();
|
| + }
|
| RestoreSessionCookies();
|
| break;
|
| }
|
|
|