Index: chrome/browser/profiles/profile_impl.cc |
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc |
index 2f493aab7d8d2388ee5a28a51334402f60451c0e..418543c4696ae3e330ee3d7c7b948f2db0124af0 100644 |
--- a/chrome/browser/profiles/profile_impl.cc |
+++ b/chrome/browser/profiles/profile_impl.cc |
@@ -641,6 +641,16 @@ void ProfileImpl::DoFinalInit() { |
dom_distiller::RegisterViewerSource(this); |
#if defined(OS_CHROMEOS) |
+ // Finished profile initialization - let the UserManager know so it can |
+ // mark the session as initialized. Need to do this before we restart below |
+ // so we don't get in a weird state where we restart before the session is |
+ // marked as initialized and so try to initialize it again. |
+ if (!chromeos::ProfileHelper::IsSigninProfile(this)) { |
+ chromeos::ProfileHelper* profile_helper = chromeos::ProfileHelper::Get(); |
+ user_manager::UserManager::Get()->OnSessionInitialized( |
+ profile_helper->GetUserByProfile(this)); |
+ } |
+ |
if (chromeos::UserSessionManager::GetInstance() |
->RestartToApplyPerSessionFlagsIfNeed(this, true)) { |
return; |