Index: chrome/browser/chromeos/login/session/user_session_manager.cc |
diff --git a/chrome/browser/chromeos/login/session/user_session_manager.cc b/chrome/browser/chromeos/login/session/user_session_manager.cc |
index edecf3a3207452a1d459eb3acaaa385835ab11b2..a554507e5d0c26a9c2441c0a2659ed23bcb2b605 100644 |
--- a/chrome/browser/chromeos/login/session/user_session_manager.cc |
+++ b/chrome/browser/chromeos/login/session/user_session_manager.cc |
@@ -423,6 +423,12 @@ void UserSessionManager::StartSession( |
// TODO(nkostylev): Notify UserLoggedIn() after profile is actually |
// ready to be used (http://crbug.com/361528). |
NotifyUserLoggedIn(); |
+ |
+ if (!user_context.GetDeviceId().empty()) { |
+ user_manager::UserManager::Get()->SetKnownUserDeviceId( |
+ user_context.GetUserID(), user_context.GetDeviceId()); |
+ } |
+ |
PrepareProfile(); |
} |
@@ -896,20 +902,6 @@ void UserSessionManager::InitProfilePreferences( |
ChromeUserManager::Get()->SetIsCurrentUserNew(true); |
} |
- std::string device_id = profile->GetPrefs()->GetString( |
- prefs::kGoogleServicesSigninScopedDeviceId); |
- if (device_id.empty()) { |
- device_id = user_context.GetDeviceId(); |
- if (!device_id.empty()) { |
- profile->GetPrefs()->SetString(prefs::kGoogleServicesSigninScopedDeviceId, |
- device_id); |
- } |
- } |
- if (!device_id.empty()) { |
- user_manager::UserManager::Get()->SetKnownUserDeviceId(user->GetUserID(), |
- device_id); |
- } |
- |
if (user->is_active()) { |
input_method::InputMethodManager* manager = |
input_method::InputMethodManager::Get(); |