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

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

Issue 145073003: Indicate which authentication flow was used in UserContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Speculative fix for telemetry. Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 993 matching lines...) Expand 10 before | Expand all | Expand 10 after
1004 gaia_screen_handler_->UpdateGaia(context); 1004 gaia_screen_handler_->UpdateGaia(context);
1005 UpdateAddButtonStatus(); 1005 UpdateAddButtonStatus();
1006 } 1006 }
1007 1007
1008 void SigninScreenHandler::UpdateAddButtonStatus() { 1008 void SigninScreenHandler::UpdateAddButtonStatus() {
1009 CallJS("cr.ui.login.DisplayManager.updateAddUserButtonStatus", 1009 CallJS("cr.ui.login.DisplayManager.updateAddUserButtonStatus",
1010 AllWhitelistedUsersPresent()); 1010 AllWhitelistedUsersPresent());
1011 } 1011 }
1012 1012
1013 void SigninScreenHandler::HandleCompleteLogin(const std::string& typed_email, 1013 void SigninScreenHandler::HandleCompleteLogin(const std::string& typed_email,
1014 const std::string& password) { 1014 const std::string& password,
1015 bool using_saml) {
1015 if (!delegate_) 1016 if (!delegate_)
1016 return; 1017 return;
1018
1017 const std::string sanitized_email = gaia::SanitizeEmail(typed_email); 1019 const std::string sanitized_email = gaia::SanitizeEmail(typed_email);
1018 delegate_->SetDisplayEmail(sanitized_email); 1020 delegate_->SetDisplayEmail(sanitized_email);
1019 delegate_->CompleteLogin(UserContext(sanitized_email, 1021 delegate_->CompleteLogin(UserContext(
1020 password, 1022 sanitized_email,
1021 std::string())); // auth_code 1023 password,
1024 std::string(), // auth_code
1025 std::string(), // username_hash
1026 true, // using_oauth
1027 using_saml ? UserContext::AUTH_FLOW_GAIA_WITH_SAML
1028 : UserContext::AUTH_FLOW_GAIA_WITHOUT_SAML));
1022 1029
1023 if (test_expects_complete_login_) { 1030 if (test_expects_complete_login_) {
1024 VLOG(2) << "Complete test login for " << typed_email 1031 VLOG(2) << "Complete test login for " << typed_email
1025 << ", requested=" << test_user_; 1032 << ", requested=" << test_user_;
1026 1033
1027 test_expects_complete_login_ = false; 1034 test_expects_complete_login_ = false;
1028 test_user_.clear(); 1035 test_user_.clear();
1029 test_pass_.clear(); 1036 test_pass_.clear();
1030 } 1037 }
1031 } 1038 }
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
1638 DCHECK(gaia_screen_handler_); 1645 DCHECK(gaia_screen_handler_);
1639 return gaia_screen_handler_->frame_state(); 1646 return gaia_screen_handler_->frame_state();
1640 } 1647 }
1641 1648
1642 net::Error SigninScreenHandler::FrameError() const { 1649 net::Error SigninScreenHandler::FrameError() const {
1643 DCHECK(gaia_screen_handler_); 1650 DCHECK(gaia_screen_handler_);
1644 return gaia_screen_handler_->frame_error(); 1651 return gaia_screen_handler_->frame_error();
1645 } 1652 }
1646 1653
1647 } // namespace chromeos 1654 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698