Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6226)

Unified Diff: chrome/browser/profiles/profile_impl.cc

Issue 2711113003: Track whether a given user session has completed initialization, and use (Closed)
Patch Set: Added tests. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;

Powered by Google App Engine
This is Rietveld 408576698