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

Unified Diff: chrome/browser/chromeos/login/session/user_session_manager.cc

Issue 2891223002: cros: Move wallpaper after login screen is gone (Closed)
Patch Set: fix nits Created 3 years, 7 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/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 deae260a89d55ada5258d47eedc5d03f67bd5d76..b9e78181fb5c3f223d47fe425013b97c43bcb764 100644
--- a/chrome/browser/chromeos/login/session/user_session_manager.cc
+++ b/chrome/browser/chromeos/login/session/user_session_manager.cc
@@ -12,6 +12,7 @@
#include "base/base_paths.h"
#include "base/bind.h"
+#include "base/callback_helpers.h"
#include "base/command_line.h"
#include "base/location.h"
#include "base/logging.h"
@@ -1748,11 +1749,6 @@ void UserSessionManager::DoBrowserLaunchInternal(Profile* profile,
BootTimesRecorder::Get()->AddLoginTimeMarker("BrowserLaunched", false);
- // Mark user session as started before creating browser window. Otherwise,
- // ash would not activate the created browser window because it thinks
- // user session is blocked.
- session_manager::SessionManager::Get()->SessionStarted();
-
VLOG(1) << "Launching browser...";
TRACE_EVENT0("login", "LaunchBrowser");
@@ -1805,11 +1801,18 @@ void UserSessionManager::DoBrowserLaunchInternal(Profile* profile,
std::make_pair(profile, fingerprint_feature_notification_controller));
}
+ base::OnceClosure login_host_finalized_callback = base::BindOnce(
+ [] { session_manager::SessionManager::Get()->SessionStarted(); });
+
// Mark login host for deletion after browser starts. This
// guarantees that the message loop will be referenced by the
// browser before it is dereferenced by the login host.
- if (login_host)
- login_host->Finalize();
+ if (login_host) {
+ login_host->Finalize(std::move(login_host_finalized_callback));
+ } else {
+ base::ResetAndReturn(&login_host_finalized_callback).Run();
+ }
+
chromeos::BootTimesRecorder::Get()->LoginDone(
user_manager::UserManager::Get()->IsCurrentUserNew());
« no previous file with comments | « chrome/browser/chromeos/login/screens/error_screen.cc ('k') | chrome/browser/chromeos/login/ui/login_display_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698