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

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

Issue 2935623003: Merge "cros: Move wallpaper after login screen is gone" (Closed)
Patch Set: Created 3 years, 6 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 2d1c4d1c0c289839000c46405c24527c005bfa78..959ad718de384725c1b2127f91d133113b104177 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"
@@ -1761,11 +1762,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");
@@ -1818,11 +1814,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