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

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

Issue 2208583006: UMA for pin unlock success/failure. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Fixed patch set 9 errors. Created 4 years, 4 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 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after
1052 return !ScreenLocker::default_screen_locker() && 1052 return !ScreenLocker::default_screen_locker() &&
1053 is_account_picker_showing_first_time_; 1053 is_account_picker_showing_first_time_;
1054 } 1054 }
1055 1055
1056 void SigninScreenHandler::UpdateAddButtonStatus() { 1056 void SigninScreenHandler::UpdateAddButtonStatus() {
1057 CallJS("cr.ui.login.DisplayManager.updateAddUserButtonStatus", 1057 CallJS("cr.ui.login.DisplayManager.updateAddUserButtonStatus",
1058 AllWhitelistedUsersPresent()); 1058 AllWhitelistedUsersPresent());
1059 } 1059 }
1060 1060
1061 void SigninScreenHandler::HandleAuthenticateUser(const AccountId& account_id, 1061 void SigninScreenHandler::HandleAuthenticateUser(const AccountId& account_id,
1062 const std::string& password) { 1062 const std::string& password,
1063 bool authenticated_by_pin) {
1063 if (!delegate_) 1064 if (!delegate_)
1064 return; 1065 return;
1065 DCHECK_EQ(account_id.GetUserEmail(), 1066 DCHECK_EQ(account_id.GetUserEmail(),
1066 gaia::SanitizeEmail(account_id.GetUserEmail())); 1067 gaia::SanitizeEmail(account_id.GetUserEmail()));
1068 chromeos::PinStorage* pin_storage =
1069 chromeos::PinStorageFactory::GetForAccountId(account_id);
1070 // If pin storage is unavailable, authenticated by PIN must be false.
1071 DCHECK(!pin_storage || pin_storage->IsPinAuthenticationAvailable() ||
1072 !authenticated_by_pin);
1067 1073
1068 UserContext user_context(account_id); 1074 UserContext user_context(account_id);
1069 user_context.SetKey(Key(password)); 1075 user_context.SetKey(Key(password));
1076 user_context.SetIsUsingPin(authenticated_by_pin);
1070 delegate_->Login(user_context, SigninSpecifics()); 1077 delegate_->Login(user_context, SigninSpecifics());
1071 1078
1072 HidePinKeyboardIfNeeded(account_id); 1079 HidePinKeyboardIfNeeded(account_id);
1073 } 1080 }
1074 1081
1075 void SigninScreenHandler::HandleLaunchIncognito() { 1082 void SigninScreenHandler::HandleLaunchIncognito() {
1076 UserContext context(user_manager::USER_TYPE_GUEST, EmptyAccountId()); 1083 UserContext context(user_manager::USER_TYPE_GUEST, EmptyAccountId());
1077 if (delegate_) 1084 if (delegate_)
1078 delegate_->Login(context, SigninSpecifics()); 1085 delegate_->Login(context, SigninSpecifics());
1079 } 1086 }
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
1494 } 1501 }
1495 1502
1496 void SigninScreenHandler::OnFeedbackFinished() { 1503 void SigninScreenHandler::OnFeedbackFinished() {
1497 CallJS("login.UnrecoverableCryptohomeErrorScreen.resumeAfterFeedbackUI"); 1504 CallJS("login.UnrecoverableCryptohomeErrorScreen.resumeAfterFeedbackUI");
1498 1505
1499 // Recreate user's cryptohome after the feedback is attempted. 1506 // Recreate user's cryptohome after the feedback is attempted.
1500 HandleResyncUserData(); 1507 HandleResyncUserData();
1501 } 1508 }
1502 1509
1503 } // namespace chromeos 1510 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h ('k') | chromeos/login/auth/user_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698