| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/gaia_screen_handler.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.h" |
| 6 | 6 |
| 7 #include "ash/common/system/chromeos/devicetype_utils.h" | 7 #include "ash/common/system/chromeos/devicetype_utils.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/guid.h" | 10 #include "base/guid.h" |
| (...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 if (account_id.GetUserEmail() != canonicalized_email) { | 494 if (account_id.GetUserEmail() != canonicalized_email) { |
| 495 LOG(WARNING) << "Existing user '" << account_id.GetUserEmail() | 495 LOG(WARNING) << "Existing user '" << account_id.GetUserEmail() |
| 496 << "' authenticated by alias '" << canonicalized_email << "'."; | 496 << "' authenticated by alias '" << canonicalized_email << "'."; |
| 497 } | 497 } |
| 498 | 498 |
| 499 return account_id; | 499 return account_id; |
| 500 } | 500 } |
| 501 | 501 |
| 502 void GaiaScreenHandler::DoAdAuth(const std::string& username, | 502 void GaiaScreenHandler::DoAdAuth(const std::string& username, |
| 503 const Key& key, | 503 const Key& key, |
| 504 authpolicy::AuthUserErrorType error, | 504 authpolicy::ErrorType error, |
| 505 const std::string& uid) { | 505 const std::string& uid) { |
| 506 if (error == authpolicy::AUTH_USER_ERROR_NONE && !uid.empty()) { | 506 if (error == authpolicy::ERROR_NONE && !uid.empty()) { |
| 507 const AccountId account_id( | 507 const AccountId account_id( |
| 508 GetAccountId(username, uid, AccountType::ACTIVE_DIRECTORY)); | 508 GetAccountId(username, uid, AccountType::ACTIVE_DIRECTORY)); |
| 509 UserContext user_context(account_id); | 509 UserContext user_context(account_id); |
| 510 user_context.SetKey(key); | 510 user_context.SetKey(key); |
| 511 user_context.SetAuthFlow(UserContext::AUTH_FLOW_ACTIVE_DIRECTORY); | 511 user_context.SetAuthFlow(UserContext::AUTH_FLOW_ACTIVE_DIRECTORY); |
| 512 user_context.SetIsUsingOAuth(false); | 512 user_context.SetIsUsingOAuth(false); |
| 513 user_context.SetUserType( | 513 user_context.SetUserType( |
| 514 user_manager::UserType::USER_TYPE_ACTIVE_DIRECTORY); | 514 user_manager::UserType::USER_TYPE_ACTIVE_DIRECTORY); |
| 515 Delegate()->CompleteLogin(user_context); | 515 Delegate()->CompleteLogin(user_context); |
| 516 } else { | 516 } else { |
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 924 bool GaiaScreenHandler::IsRestrictiveProxy() const { | 924 bool GaiaScreenHandler::IsRestrictiveProxy() const { |
| 925 return !disable_restrictive_proxy_check_for_test_ && | 925 return !disable_restrictive_proxy_check_for_test_ && |
| 926 !IsOnline(captive_portal_status_); | 926 !IsOnline(captive_portal_status_); |
| 927 } | 927 } |
| 928 | 928 |
| 929 void GaiaScreenHandler::DisableRestrictiveProxyCheckForTest() { | 929 void GaiaScreenHandler::DisableRestrictiveProxyCheckForTest() { |
| 930 disable_restrictive_proxy_check_for_test_ = true; | 930 disable_restrictive_proxy_check_for_test_ = true; |
| 931 } | 931 } |
| 932 | 932 |
| 933 } // namespace chromeos | 933 } // namespace chromeos |
| OLD | NEW |