Skip to content

Commit

Permalink
[session_manager] Move user session initialization code out of Existi…
Browse files Browse the repository at this point in the history
…ngUserController

Added UserSessionManager::InitializeUserSession()
(1) Launches browser for most common case
(2) Continues new user sign in with TOS (public sessions)/image screen (new users)
(3) For kiosk flow delegates launching app to the existing kiosk initialization flow

(1) Currently results in LoginUtils::Get()->DoBrowserLaunch() which may postpone launching browser for these reasons:
(a) There's custom user login flow defined like SupervisedUserCreationFlow. In that case login UI continues to live and custom flow UI is launched in that context.
(b) User has different app locale which requires reloading resource_bundle prior to launching browser
(c) User has custom flags set (or user flags are different from login screen flags defined by the owner), this requires restarting Chrome which will be launched in the active user session.

Small refactoring in ExistingUserController, added

* PerformPreLoginActions() - performs sets of actions right prior to login has been started.
* PerformLoginFinishedActions() - performs set of actions when login has been completed or has been cancelled.

BUG=370175

Review URL: https://codereview.chromium.org/656283002

Cr-Commit-Position: refs/heads/master@{#300708}
  • Loading branch information
nkostylev authored and Commit bot committed Oct 22, 2014
1 parent 8aecd2d commit 609c2d1
Show file tree
Hide file tree
Showing 17 changed files with 335 additions and 241 deletions.
3 changes: 2 additions & 1 deletion chrome/browser/chromeos/app_mode/kiosk_profile_loader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ void KioskProfileLoader::OnOnlineChecked(
NOTREACHED();
}

void KioskProfileLoader::OnProfilePrepared(Profile* profile) {
void KioskProfileLoader::OnProfilePrepared(Profile* profile,
bool browser_launched) {
// This object could be deleted any time after successfully reporting
// a profile load, so invalidate the LoginUtils delegate now.
LoginUtils::Get()->DelegateDeleted(this);
Expand Down
3 changes: 2 additions & 1 deletion chrome/browser/chromeos/app_mode/kiosk_profile_loader.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ class KioskProfileLoader : public LoginPerformer::Delegate,
const std::string& email, bool success) override;

// LoginUtils::Delegate implementation:
virtual void OnProfilePrepared(Profile* profile) override;
virtual void OnProfilePrepared(Profile* profile,
bool browser_launched) override;

std::string user_id_;
bool use_guest_mount_;
Expand Down
Loading

0 comments on commit 609c2d1

Please sign in to comment.