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

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

Issue 2711113003: Track whether a given user session has completed initialization, and use (Closed)
Patch Set: Only expose known_user::RemovePrefsForTesting() for tests Created 3 years, 9 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
« no previous file with comments | « chrome/browser/profiles/profile_browsertest.cc ('k') | components/user_manager/fake_user_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_impl.cc
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index 03d8ff3f37acab890adfa982e2b42bc4b0e9cb25..e13af7ed29e42ec3bbc33367abc3cdd10f1d52a5 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -644,6 +644,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()->OnProfileInitialized(
+ profile_helper->GetUserByProfile(this));
+ }
+
if (chromeos::UserSessionManager::GetInstance()
->RestartToApplyPerSessionFlagsIfNeed(this, true)) {
return;
« no previous file with comments | « chrome/browser/profiles/profile_browsertest.cc ('k') | components/user_manager/fake_user_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698