Chromium Code Reviews| Index: chrome/browser/chromeos/login/existing_user_controller.h |
| diff --git a/chrome/browser/chromeos/login/existing_user_controller.h b/chrome/browser/chromeos/login/existing_user_controller.h |
| index e1bc66c7a5ec50e8ad8816de9d157a43b8b72a43..1ffd0a111f1f17b419aceb2cc12c2024378d452e 100644 |
| --- a/chrome/browser/chromeos/login/existing_user_controller.h |
| +++ b/chrome/browser/chromeos/login/existing_user_controller.h |
| @@ -18,6 +18,7 @@ |
| #include "base/strings/string16.h" |
| #include "base/time/time.h" |
| #include "base/timer/timer.h" |
| +#include "chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_manager.h" |
| #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" |
| #include "chrome/browser/chromeos/login/session/user_session_manager.h" |
| #include "chrome/browser/chromeos/login/signin/token_handle_util.h" |
| @@ -55,10 +56,12 @@ class NetworkStateHelper; |
| // all login UI implementation. |
| // ExistingUserController maintains it's own life cycle and deletes itself when |
| // the user logs in (or chooses to see other settings). |
| -class ExistingUserController : public LoginDisplay::Delegate, |
| - public content::NotificationObserver, |
| - public LoginPerformer::Delegate, |
| - public UserSessionManagerDelegate { |
| +class ExistingUserController |
| + : public LoginDisplay::Delegate, |
| + public content::NotificationObserver, |
| + public LoginPerformer::Delegate, |
| + public UserSessionManagerDelegate, |
| + public ArcKioskAppManager::ArcKioskAppManagerObserver { |
| public: |
| // All UI initialization is deferred till Init() call. |
| explicit ExistingUserController(LoginDisplayHost* host); |
| @@ -72,11 +75,11 @@ class ExistingUserController : public LoginDisplay::Delegate, |
| // Creates and shows login UI for known users. |
| void Init(const user_manager::UserList& users); |
| - // Start the public session auto-login timer. |
| - void StartPublicSessionAutoLoginTimer(); |
| + // Start the auto-login timer. |
| + void StartAutoLoginTimer(); |
| - // Stop the public session auto-login timer when a login attempt begins. |
| - void StopPublicSessionAutoLoginTimer(); |
| + // Stop the auto-login timer when a login attempt begins. |
| + void StopAutoLoginTimer(); |
| // LoginDisplay::Delegate: implementation |
| void CancelPasswordChangedFlow() override; |
| @@ -87,6 +90,7 @@ class ExistingUserController : public LoginDisplay::Delegate, |
| const SigninSpecifics& specifics) override; |
| void MigrateUserData(const std::string& old_password) override; |
| void OnSigninScreenReady() override; |
| + void OnGaiaScreenReady() override; |
| void OnStartEnterpriseEnrollment() override; |
| void OnStartEnableDebuggingScreen() override; |
| void OnStartKioskEnableScreen() override; |
| @@ -103,6 +107,9 @@ class ExistingUserController : public LoginDisplay::Delegate, |
| const content::NotificationSource& source, |
| const content::NotificationDetails& details) override; |
| + // ArcKioskAppManager::ArcKioskAppManagerObserver overrides. |
| + void OnArcKioskAppsChanged() override; |
| + |
| // Set a delegate that we will pass AuthStatusConsumer events to. |
| // Used for testing. |
| void set_login_status_consumer(AuthStatusConsumer* consumer) { |
| @@ -138,12 +145,14 @@ class ExistingUserController : public LoginDisplay::Delegate, |
| void LoginAsPublicSession(const UserContext& user_context); |
| void LoginAsKioskApp(const std::string& app_id, bool diagnostic_mode); |
| void LoginAsArcKioskApp(const AccountId& account_id); |
| - |
| - // Retrieve public session auto-login policy and update the timer. |
| - void ConfigurePublicSessionAutoLogin(); |
| + // Retrieve public session and ARC kiosk auto-login policy and update the |
| + // timer. |
| + void ConfigureAutoLogin(); |
| // Trigger public session auto-login. |
| void OnPublicSessionAutoLoginTimerFire(); |
| + // Trigger ARC kiosk auto-login. |
| + void OnArcKioskAutoLoginTimerFire(); |
| // LoginPerformer::Delegate implementation: |
| void OnAuthFailure(const AuthFailure& error) override; |
| @@ -255,12 +264,15 @@ class ExistingUserController : public LoginDisplay::Delegate, |
| // Public session auto-login timer. |
| std::unique_ptr<base::OneShotTimer> auto_login_timer_; |
| - // Public session auto-login timeout, in milliseconds. |
| - int public_session_auto_login_delay_; |
| + // Auto-login timeout, in milliseconds. |
| + int auto_login_delay_; |
| // AccountId for public session auto-login. |
| AccountId public_session_auto_login_account_id_ = EmptyAccountId(); |
| + // AccountId for ARC kiosk auto-login. |
| + AccountId arc_kiosk_auto_login_account_id_ = EmptyAccountId(); |
| + |
| // Used to execute login operations. |
| std::unique_ptr<LoginPerformer> login_performer_; |
| @@ -309,7 +321,7 @@ class ExistingUserController : public LoginDisplay::Delegate, |
| LoginPerformer::AuthorizationMode auth_mode_ = |
| LoginPerformer::AUTH_MODE_EXTENSION; |
| - // Whether the sign-in UI is finished loading. |
| + // Whether the sign-in or GAIA UI is finished loading. |
| bool signin_screen_ready_ = false; |
|
Nikita (slow)
2016/11/18 17:05:49
nit: As discussed rename to auto_launch_ready_ as
Sergey Poromov
2016/11/18 18:56:11
Done.
|
| // Indicates use of local (not GAIA) authentication. |