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

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 1 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()));
1067 1068
1068 UserContext user_context(account_id); 1069 UserContext user_context(account_id);
jdufault 2016/08/08 18:54:26 I don't think we need to pass authenticated_by_pin
sammiequon 2016/08/09 00:31:25 Done.
1069 user_context.SetKey(Key(password)); 1070 user_context.SetKey(Key(password));
1071 user_context.SetIsUsingPin(authenticated_by_pin);
1070 delegate_->Login(user_context, SigninSpecifics()); 1072 delegate_->Login(user_context, SigninSpecifics());
1071 1073
1072 HidePinKeyboardIfNeeded(account_id); 1074 HidePinKeyboardIfNeeded(account_id);
1073 } 1075 }
1074 1076
1075 void SigninScreenHandler::HandleLaunchIncognito() { 1077 void SigninScreenHandler::HandleLaunchIncognito() {
1076 UserContext context(user_manager::USER_TYPE_GUEST, EmptyAccountId()); 1078 UserContext context(user_manager::USER_TYPE_GUEST, EmptyAccountId());
1077 if (delegate_) 1079 if (delegate_)
1078 delegate_->Login(context, SigninSpecifics()); 1080 delegate_->Login(context, SigninSpecifics());
1079 } 1081 }
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
1494 } 1496 }
1495 1497
1496 void SigninScreenHandler::OnFeedbackFinished() { 1498 void SigninScreenHandler::OnFeedbackFinished() {
1497 CallJS("login.UnrecoverableCryptohomeErrorScreen.resumeAfterFeedbackUI"); 1499 CallJS("login.UnrecoverableCryptohomeErrorScreen.resumeAfterFeedbackUI");
1498 1500
1499 // Recreate user's cryptohome after the feedback is attempted. 1501 // Recreate user's cryptohome after the feedback is attempted.
1500 HandleResyncUserData(); 1502 HandleResyncUserData();
1501 } 1503 }
1502 1504
1503 } // namespace chromeos 1505 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698