Chromium Code Reviews| Index: chrome/browser/chromeos/login/login_utils.cc |
| diff --git a/chrome/browser/chromeos/login/login_utils.cc b/chrome/browser/chromeos/login/login_utils.cc |
| index c4094bbf86e3e7e37732fb7258543fc63165a074..bc97da02a4c1fb46042133fc46126f59846f63ab 100644 |
| --- a/chrome/browser/chromeos/login/login_utils.cc |
| +++ b/chrome/browser/chromeos/login/login_utils.cc |
| @@ -427,7 +427,8 @@ void LoginUtilsImpl::PrepareProfile( |
| // The default profile will have been changed because the ProfileManager |
| // will process the notification that the UserManager sends out. |
| ProfileManager::CreateDefaultProfileAsync( |
| - base::Bind(&LoginUtilsImpl::OnProfileCreated, AsWeakPtr())); |
| + base::Bind(&LoginUtilsImpl::OnProfileCreated, AsWeakPtr()), |
| + UserManager::Get()->IsLoggedInAsLocallyManagedUser()); |
| if (wait_for_policy_fetch) { |
| // Profile creation will block until user policy is fetched, which |
| @@ -455,7 +456,9 @@ void LoginUtilsImpl::InitProfilePreferences(Profile* user_profile) { |
| if (UserManager::Get()->IsCurrentUserNew()) |
| SetFirstLoginPrefs(user_profile->GetPrefs()); |
| - if (!UserManager::Get()->IsLoggedInAsLocallyManagedUser()) { |
| + if (UserManager::Get()->IsLoggedInAsLocallyManagedUser()) { |
| + user_profile->GetPrefs()->SetBoolean(prefs::kProfileIsManaged, true); |
| + } else { |
| // Make sure that the google service username is properly set (we do this |
| // on every sign in, not just the first login, to deal with existing |
| // profiles that might not have it set yet). |
| @@ -503,6 +506,7 @@ void LoginUtilsImpl::OnProfileCreated( |
| return; |
| } |
| + // Processing Profile::CREATE_STATUS_INITIALIZED notification. |
|
Dmitry Polukhin
2013/02/08 17:26:53
Could you please remove this comment and make it c
Nikita (slow)
2013/02/11 09:42:12
Done.
|
| BootTimesLoader* btl = BootTimesLoader::Get(); |
| btl->AddLoginTimeMarker("UserProfileGotten", false); |