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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc

Issue 1693383003: ChromeOS cryptohome should be able to use gaia id as user identifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing files. Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" 5 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <vector> 10 #include <vector>
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 return; 981 return;
982 DCHECK_EQ(account_id.GetUserEmail(), 982 DCHECK_EQ(account_id.GetUserEmail(),
983 gaia::SanitizeEmail(account_id.GetUserEmail())); 983 gaia::SanitizeEmail(account_id.GetUserEmail()));
984 984
985 UserContext user_context(account_id); 985 UserContext user_context(account_id);
986 user_context.SetKey(Key(password)); 986 user_context.SetKey(Key(password));
987 delegate_->Login(user_context, SigninSpecifics()); 987 delegate_->Login(user_context, SigninSpecifics());
988 } 988 }
989 989
990 void SigninScreenHandler::HandleLaunchIncognito() { 990 void SigninScreenHandler::HandleLaunchIncognito() {
991 UserContext context(user_manager::USER_TYPE_GUEST, std::string()); 991 UserContext context(user_manager::USER_TYPE_GUEST, EmptyAccountId());
992 if (delegate_) 992 if (delegate_)
993 delegate_->Login(context, SigninSpecifics()); 993 delegate_->Login(context, SigninSpecifics());
994 } 994 }
995 995
996 void SigninScreenHandler::HandleShowSupervisedUserCreationScreen() { 996 void SigninScreenHandler::HandleShowSupervisedUserCreationScreen() {
997 if (!user_manager::UserManager::Get()->AreSupervisedUsersAllowed()) { 997 if (!user_manager::UserManager::Get()->AreSupervisedUsersAllowed()) {
998 LOG(ERROR) << "Managed users not allowed."; 998 LOG(ERROR) << "Managed users not allowed.";
999 return; 999 return;
1000 } 1000 }
1001 LoginDisplayHost::default_host()->StartWizard( 1001 LoginDisplayHost::default_host()->StartWizard(
1002 WizardController::kSupervisedUserCreationScreenName); 1002 WizardController::kSupervisedUserCreationScreenName);
1003 } 1003 }
1004 1004
1005 void SigninScreenHandler::HandleLaunchPublicSession( 1005 void SigninScreenHandler::HandleLaunchPublicSession(
1006 const AccountId& account_id, 1006 const AccountId& account_id,
1007 const std::string& locale, 1007 const std::string& locale,
1008 const std::string& input_method) { 1008 const std::string& input_method) {
1009 if (!delegate_) 1009 if (!delegate_)
1010 return; 1010 return;
1011 1011
1012 UserContext context(user_manager::USER_TYPE_PUBLIC_ACCOUNT, 1012 UserContext context(user_manager::USER_TYPE_PUBLIC_ACCOUNT, account_id);
1013 account_id.GetUserEmail());
1014 context.SetPublicSessionLocale(locale), 1013 context.SetPublicSessionLocale(locale),
1015 context.SetPublicSessionInputMethod(input_method); 1014 context.SetPublicSessionInputMethod(input_method);
1016 delegate_->Login(context, SigninSpecifics()); 1015 delegate_->Login(context, SigninSpecifics());
1017 } 1016 }
1018 1017
1019 void SigninScreenHandler::HandleOfflineLogin(const base::ListValue* args) { 1018 void SigninScreenHandler::HandleOfflineLogin(const base::ListValue* args) {
1020 if (!delegate_ || delegate_->IsShowUsers()) { 1019 if (!delegate_ || delegate_->IsShowUsers()) {
1021 NOTREACHED(); 1020 NOTREACHED();
1022 return; 1021 return;
1023 } 1022 }
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
1256 void SigninScreenHandler::SendPublicSessionKeyboardLayouts( 1255 void SigninScreenHandler::SendPublicSessionKeyboardLayouts(
1257 const AccountId& account_id, 1256 const AccountId& account_id,
1258 const std::string& locale, 1257 const std::string& locale,
1259 scoped_ptr<base::ListValue> keyboard_layouts) { 1258 scoped_ptr<base::ListValue> keyboard_layouts) {
1260 CallJS("login.AccountPickerScreen.setPublicSessionKeyboardLayouts", 1259 CallJS("login.AccountPickerScreen.setPublicSessionKeyboardLayouts",
1261 account_id, locale, *keyboard_layouts); 1260 account_id, locale, *keyboard_layouts);
1262 } 1261 }
1263 1262
1264 void SigninScreenHandler::HandleLaunchKioskApp(const AccountId& app_account_id, 1263 void SigninScreenHandler::HandleLaunchKioskApp(const AccountId& app_account_id,
1265 bool diagnostic_mode) { 1264 bool diagnostic_mode) {
1266 UserContext context(user_manager::USER_TYPE_KIOSK_APP, 1265 UserContext context(user_manager::USER_TYPE_KIOSK_APP, app_account_id);
1267 app_account_id.GetUserEmail());
1268 SigninSpecifics specifics; 1266 SigninSpecifics specifics;
1269 specifics.kiosk_diagnostic_mode = diagnostic_mode; 1267 specifics.kiosk_diagnostic_mode = diagnostic_mode;
1270 if (delegate_) 1268 if (delegate_)
1271 delegate_->Login(context, specifics); 1269 delegate_->Login(context, specifics);
1272 } 1270 }
1273 1271
1274 void SigninScreenHandler::HandleGetTouchViewState() { 1272 void SigninScreenHandler::HandleGetTouchViewState() {
1275 if (max_mode_delegate_) { 1273 if (max_mode_delegate_) {
1276 CallJS("login.AccountPickerScreen.setTouchViewState", 1274 CallJS("login.AccountPickerScreen.setTouchViewState",
1277 max_mode_delegate_->IsMaximizeModeEnabled()); 1275 max_mode_delegate_->IsMaximizeModeEnabled());
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1386 return gaia_screen_handler_->frame_error(); 1384 return gaia_screen_handler_->frame_error();
1387 } 1385 }
1388 1386
1389 void SigninScreenHandler::OnCapsLockChanged(bool enabled) { 1387 void SigninScreenHandler::OnCapsLockChanged(bool enabled) {
1390 caps_lock_enabled_ = enabled; 1388 caps_lock_enabled_ = enabled;
1391 if (page_is_ready()) 1389 if (page_is_ready())
1392 CallJS("login.AccountPickerScreen.setCapsLockState", caps_lock_enabled_); 1390 CallJS("login.AccountPickerScreen.setCapsLockState", caps_lock_enabled_);
1393 } 1391 }
1394 1392
1395 } // namespace chromeos 1393 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698