Chromium Code Reviews| 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 9018d8ac251dd61e89245bdd31e8ae7f35f6c1c0..03efb2cba9af0c2a4dea29d7dfe61dea487f02a1 100644 |
| --- a/chrome/browser/chromeos/login/session/user_session_manager.cc |
| +++ b/chrome/browser/chromeos/login/session/user_session_manager.cc |
| @@ -423,6 +423,11 @@ 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()) |
|
pavely
2015/05/13 00:05:52
nit: Consider using user_context instead of user_c
dzhioev (left Google)
2015/05/13 20:24:22
Done.
|
| + user_manager::UserManager::Get()->SetKnownUserDeviceId( |
| + user_context_.GetUserID(), user_context_.GetDeviceId()); |
| + |
| PrepareProfile(); |
| } |
| @@ -896,20 +901,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(); |