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

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

Issue 2468483002: session_manager: Tracks user sessions (Closed)
Patch Set: replace func overload with better names Created 4 years, 1 month 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 c8a3dae353e4d6f70f5b2511fc4d31debd597e73..d7a15132d266143febd36a35ce64baebf4cb3132 100644
--- a/chrome/browser/chromeos/login/session/user_session_manager.cc
+++ b/chrome/browser/chromeos/login/session/user_session_manager.cc
@@ -488,10 +488,6 @@ void UserSessionManager::StartSession(
if (!has_active_session)
StartCrosSession();
- // TODO(nkostylev): Notify UserLoggedIn() after profile is actually
- // ready to be used (http://crbug.com/361528).
- NotifyUserLoggedIn();
-
if (!user_context.GetDeviceId().empty()) {
user_manager::known_user::SetDeviceId(user_context.GetAccountId(),
user_context.GetDeviceId());
@@ -888,6 +884,8 @@ void UserSessionManager::CreateUserSession(const UserContext& user_context,
has_auth_cookies_ = has_auth_cookies;
InitSessionRestoreStrategy();
StoreUserContextDataBeforeProfileIsCreated();
+ session_manager::SessionManager::Get()->CreateSession(
+ user_context_.GetAccountId(), user_context_.GetUserIDHash());
}
void UserSessionManager::PreStartSession() {
@@ -912,15 +910,6 @@ void UserSessionManager::StartCrosSession() {
btl->AddLoginTimeMarker("StartSession-End", false);
}
-void UserSessionManager::NotifyUserLoggedIn() {
- BootTimesRecorder* btl = BootTimesRecorder::Get();
- btl->AddLoginTimeMarker("UserLoggedIn-Start", false);
- user_manager::UserManager* user_manager = user_manager::UserManager::Get();
- user_manager->UserLoggedIn(user_context_.GetAccountId(),
- user_context_.GetUserIDHash(), false);
- btl->AddLoginTimeMarker("UserLoggedIn-End", false);
-}
-
void UserSessionManager::PrepareProfile() {
const bool is_demo_session =
DemoAppLauncher::IsDemoAppSession(user_context_.GetAccountId());

Powered by Google App Engine
This is Rietveld 408576698