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 0b2d8363d9a12cbf3a93af11c8fd229f68427c60..116e1b3d7600b7626b5549ee8ce9724ab6836df9 100644 |
--- a/chrome/browser/chromeos/login/oauth2_login_manager.cc |
+++ b/chrome/browser/chromeos/login/oauth2_login_manager.cc |
@@ -55,6 +55,10 @@ void OAuth2LoginManager::RestoreSession( |
SessionRestoreStrategy restore_strategy, |
const std::string& oauth2_refresh_token, |
const std::string& auth_code) { |
+ // TODO(nkostylev): OAuth2LoginManager should support multi-profiles or |
+ // should be refactored as ProfileKeyedService. For now we unsubscribe from |
+ // TokenService notifications of a user that was previously active. |
+ registrar_.RemoveAll(); |
user_profile_ = user_profile; |
auth_request_context_ = auth_request_context; |
state_ = OAuthLoginManager::SESSION_RESTORE_IN_PROGRESS; |