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

Unified Diff: chrome/browser/chromeos/login/login_utils.cc

Issue 656283002: [session_manager] Move user session initialization code out of ExistingUserController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update FakeLoginUtils to launch browser Created 6 years, 2 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/login_utils.cc
diff --git a/chrome/browser/chromeos/login/login_utils.cc b/chrome/browser/chromeos/login/login_utils.cc
index 9c4e297e82e4df3c2e956757937e34cba016d7c6..153400d3fc4a2ef30dcfbfbc21609db3d9d48677 100644
--- a/chrome/browser/chromeos/login/login_utils.cc
+++ b/chrome/browser/chromeos/login/login_utils.cc
@@ -48,6 +48,7 @@
#include "chrome/browser/chromeos/login/signin/oauth2_login_manager_factory.h"
#include "chrome/browser/chromeos/login/ui/input_events_blocker.h"
#include "chrome/browser/chromeos/login/ui/login_display_host.h"
+#include "chrome/browser/chromeos/login/ui/user_adding_screen.h"
#include "chrome/browser/chromeos/login/user_flow.h"
#include "chrome/browser/chromeos/login/users/chrome_user_manager.h"
#include "chrome/browser/chromeos/login/users/supervised_user_manager.h"
@@ -200,7 +201,8 @@ class LoginUtilsImpl : public LoginUtils,
bool early_restart) override;
// UserSessionManager::Delegate implementation:
- virtual void OnProfilePrepared(Profile* profile) override;
+ virtual void OnProfilePrepared(Profile* profile,
+ bool browser_launched) override;
#if defined(ENABLE_RLZ)
virtual void OnRlzInitialized() override;
#endif
@@ -371,12 +373,21 @@ void LoginUtilsImpl::PrepareProfile(
// as it coexist with SessionManager.
delegate_ = delegate;
+ UserSessionManager::StartSessionType start_session_type =
+ UserAddingScreen::Get()->IsRunning() ?
+ UserSessionManager::SECONDARY_USER_SESSION :
+ UserSessionManager::PRIMARY_USER_SESSION;
+
// For the transition part LoginUtils will just delegate profile
// creation and initialization to SessionManager. Later LoginUtils will be
// removed and all LoginUtils clients will just work with SessionManager
// directly.
- UserSessionManager::GetInstance()->StartSession(
- user_context, authenticator_, has_auth_cookies, has_active_session, this);
+ UserSessionManager::GetInstance()->StartSession(user_context,
+ start_session_type,
+ authenticator_,
+ has_auth_cookies,
+ has_active_session,
+ this);
}
void LoginUtilsImpl::DelegateDeleted(LoginUtils::Delegate* delegate) {
@@ -429,9 +440,10 @@ scoped_refptr<Authenticator> LoginUtilsImpl::CreateAuthenticator(
return authenticator_;
}
-void LoginUtilsImpl::OnProfilePrepared(Profile* profile) {
+void LoginUtilsImpl::OnProfilePrepared(Profile* profile,
+ bool browser_launched) {
if (delegate_)
- delegate_->OnProfilePrepared(profile);
+ delegate_->OnProfilePrepared(profile, browser_launched);
}
#if defined(ENABLE_RLZ)

Powered by Google App Engine
This is Rietveld 408576698