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

Unified Diff: chrome/browser/chromeos/login/existing_user_controller.h

Issue 12218078: Implement a policy to autologin a public account. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: r3b@$3 Created 7 years, 9 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
« no previous file with comments | « chrome/app/policy/policy_templates.json ('k') | chrome/browser/chromeos/login/existing_user_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 16397e6bef0abce93eb83ae35179c5f1b4dc1088..6d5300191a188a1e745b2a4d082af5dac796d747 100644
--- a/chrome/browser/chromeos/login/existing_user_controller.h
+++ b/chrome/browser/chromeos/login/existing_user_controller.h
@@ -7,6 +7,7 @@
#include <string>
+#include "base/basictypes.h"
#include "base/callback_forward.h"
#include "base/compiler_specific.h"
#include "base/gtest_prod_util.h"
@@ -67,6 +68,12 @@ class ExistingUserController : public LoginDisplay::Delegate,
// Invoked when a kiosk app launch is failed.
void OnKioskAppLaunchFailed();
+ // Start the public session auto-login timer.
+ void StartPublicSessionAutoLoginTimer();
+
+ // Stop the public session auto-login timer when a login attempt begins.
+ void StopPublicSessionAutoLoginTimer();
+
// LoginDisplay::Delegate: implementation
virtual void CancelPasswordChangedFlow() OVERRIDE;
virtual void CreateAccount() OVERRIDE;
@@ -81,9 +88,11 @@ class ExistingUserController : public LoginDisplay::Delegate,
virtual void LoginAsRetailModeUser() OVERRIDE;
virtual void LoginAsGuest() OVERRIDE;
virtual void LoginAsPublicAccount(const std::string& username) OVERRIDE;
+ virtual void OnSigninScreenReady() OVERRIDE;
virtual void OnUserSelected(const std::string& username) OVERRIDE;
virtual void OnStartEnterpriseEnrollment() OVERRIDE;
virtual void OnStartDeviceReset() OVERRIDE;
+ virtual void ResetPublicSessionAutoLoginTimer() OVERRIDE;
virtual void ResyncUserData() OVERRIDE;
virtual void SetDisplayEmail(const std::string& email) OVERRIDE;
virtual void ShowWrongHWIDScreen() OVERRIDE;
@@ -113,8 +122,16 @@ class ExistingUserController : public LoginDisplay::Delegate,
private:
friend class ExistingUserControllerTest;
+ friend class ExistingUserControllerAutoLoginTest;
+ friend class ExistingUserControllerPublicSessionTest;
friend class MockLoginPerformerDelegate;
+ // Retrieve public session auto-login policy and update the timer.
+ void ConfigurePublicSessionAutoLogin();
+
+ // Trigger public session auto-login.
+ void OnPublicSessionAutoLoginTimerFire();
+
// LoginPerformer::Delegate implementation:
virtual void OnLoginFailure(const LoginFailure& error) OVERRIDE;
virtual void OnLoginSuccess(
@@ -195,6 +212,15 @@ class ExistingUserController : public LoginDisplay::Delegate,
// Updates the |login_display_| attached to this controller.
void UpdateLoginDisplay(const UserList& users);
+ // Public session auto-login timer.
+ scoped_ptr<base::OneShotTimer<ExistingUserController> > auto_login_timer_;
+
+ // Public session auto-login timeout, in milliseconds.
+ int public_session_auto_login_delay_;
+
+ // Username for public session auto-login.
+ std::string public_session_auto_login_username_;
+
// Used to execute login operations.
scoped_ptr<LoginPerformer> login_performer_;
@@ -255,6 +281,9 @@ class ExistingUserController : public LoginDisplay::Delegate,
// session.
bool do_auto_enrollment_;
+ // Whether the sign-in UI is finished loading.
+ bool signin_screen_ready_;
+
// The username used for auto-enrollment, if it was triggered.
std::string auto_enrollment_username_;
« no previous file with comments | « chrome/app/policy/policy_templates.json ('k') | chrome/browser/chromeos/login/existing_user_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698