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

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

Issue 324463003: ChromeOS login webui refactoring : Simplify login methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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/existing_user_controller.cc
diff --git a/chrome/browser/chromeos/login/existing_user_controller.cc b/chrome/browser/chromeos/login/existing_user_controller.cc
index 4a4d714a3e486fd1682fe70b4c14490d1d8bad42..fc372a837bd7b89ad4f3af999cd5270964c7249a 100644
--- a/chrome/browser/chromeos/login/existing_user_controller.cc
+++ b/chrome/browser/chromeos/login/existing_user_controller.cc
@@ -381,7 +381,24 @@ bool ExistingUserController::IsSigninInProgress() const {
return is_login_in_progress_;
}
-void ExistingUserController::Login(const UserContext& user_context) {
+void ExistingUserController::Login(const UserContext& user_context,
+ const SigninSpecifics& specifics) {
+ if (user_context.GetUserType() == User::USER_TYPE_GUEST) {
+ LoginAsGuest();
+ return;
+ }
+ if (user_context.GetUserType() == User::USER_TYPE_PUBLIC_ACCOUNT) {
Nikita (slow) 2014/06/06 14:49:47 nit: else if here and below.
Denis Kuznetsov (DE-MUC) 2014/06/06 15:18:42 Done.
+ LoginAsPublicAccount(user_context.GetUserID());
+ return;
+ }
+ if (user_context.GetUserType() == User::USER_TYPE_RETAIL_MODE) {
+ LoginAsRetailModeUser();
+ return;
+ }
+ if (user_context.GetUserType() == User::USER_TYPE_KIOSK_APP) {
+ LoginAsKioskApp(user_context.GetUserID(), specifics.kiosk_diagnostic_mode);
+ return;
+ }
if (!user_context.HasCredentials())
return;

Powered by Google App Engine
This is Rietveld 408576698