| 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 10 matching lines...) Expand all Loading... |
| 21 #include "chrome/browser/chromeos/login/helper.h" | 21 #include "chrome/browser/chromeos/login/helper.h" |
| 22 #include "chrome/browser/chromeos/login/screens/network_error.h" | 22 #include "chrome/browser/chromeos/login/screens/network_error.h" |
| 23 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h" | 23 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h" |
| 24 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" | 24 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" |
| 25 #include "chrome/browser/chromeos/net/network_portal_detector_impl.h" | 25 #include "chrome/browser/chromeos/net/network_portal_detector_impl.h" |
| 26 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 26 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 27 #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h" | 27 #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h" |
| 28 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 28 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 29 #include "chrome/browser/chromeos/settings/cros_settings.h" | 29 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 30 #include "chrome/browser/io_thread.h" | 30 #include "chrome/browser/io_thread.h" |
| 31 #include "chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.h" |
| 31 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" | 32 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" |
| 32 #include "chrome/browser/ui/webui/signin/signin_utils.h" | 33 #include "chrome/browser/ui/webui/signin/signin_utils.h" |
| 33 #include "chrome/common/channel_info.h" | 34 #include "chrome/common/channel_info.h" |
| 34 #include "chrome/common/pref_names.h" | 35 #include "chrome/common/pref_names.h" |
| 35 #include "chrome/grit/generated_resources.h" | 36 #include "chrome/grit/generated_resources.h" |
| 36 #include "chromeos/chromeos_switches.h" | 37 #include "chromeos/chromeos_switches.h" |
| 37 #include "chromeos/dbus/auth_policy_client.h" | 38 #include "chromeos/dbus/auth_policy_client.h" |
| 38 #include "chromeos/dbus/dbus_thread_manager.h" | 39 #include "chromeos/dbus/dbus_thread_manager.h" |
| 39 #include "chromeos/login/auth/user_context.h" | 40 #include "chromeos/login/auth/user_context.h" |
| 40 #include "chromeos/settings/cros_settings_names.h" | 41 #include "chromeos/settings/cros_settings_names.h" |
| (...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 551 user_context.SetUserType( | 552 user_context.SetUserType( |
| 552 user_manager::UserType::USER_TYPE_ACTIVE_DIRECTORY); | 553 user_manager::UserType::USER_TYPE_ACTIVE_DIRECTORY); |
| 553 Delegate()->CompleteLogin(user_context); | 554 Delegate()->CompleteLogin(user_context); |
| 554 break; | 555 break; |
| 555 } | 556 } |
| 556 case authpolicy::ERROR_PASSWORD_EXPIRED: | 557 case authpolicy::ERROR_PASSWORD_EXPIRED: |
| 557 core_oobe_view_->ShowActiveDirectoryPasswordChangeScreen(username); | 558 core_oobe_view_->ShowActiveDirectoryPasswordChangeScreen(username); |
| 558 break; | 559 break; |
| 559 case authpolicy::ERROR_PARSE_UPN_FAILED: | 560 case authpolicy::ERROR_PARSE_UPN_FAILED: |
| 560 case authpolicy::ERROR_BAD_USER_NAME: | 561 case authpolicy::ERROR_BAD_USER_NAME: |
| 562 CallJS("invalidateAd", username, |
| 563 static_cast<int>(ActiveDirectoryErrorState::BAD_USERNAME)); |
| 564 return; |
| 561 case authpolicy::ERROR_BAD_PASSWORD: | 565 case authpolicy::ERROR_BAD_PASSWORD: |
| 562 CallJS("invalidateAd", username); | 566 CallJS("invalidateAd", username, |
| 563 return; | 567 static_cast<int>(ActiveDirectoryErrorState::BAD_PASSWORD)); |
| 564 case authpolicy::ERROR_UNKNOWN: | 568 case authpolicy::ERROR_UNKNOWN: |
| 565 case authpolicy::ERROR_DBUS_FAILURE: | 569 case authpolicy::ERROR_DBUS_FAILURE: |
| 566 case authpolicy::ERROR_CANNOT_RESOLVE_KDC: | 570 case authpolicy::ERROR_CANNOT_RESOLVE_KDC: |
| 567 case authpolicy::ERROR_KINIT_FAILED: | 571 case authpolicy::ERROR_KINIT_FAILED: |
| 568 case authpolicy::ERROR_NET_FAILED: | 572 case authpolicy::ERROR_NET_FAILED: |
| 569 case authpolicy::ERROR_SMBCLIENT_FAILED: | 573 case authpolicy::ERROR_SMBCLIENT_FAILED: |
| 570 case authpolicy::ERROR_PARSE_FAILED: | 574 case authpolicy::ERROR_PARSE_FAILED: |
| 571 case authpolicy::ERROR_PARSE_PREG_FAILED: | 575 case authpolicy::ERROR_PARSE_PREG_FAILED: |
| 572 case authpolicy::ERROR_BAD_GPOS: | 576 case authpolicy::ERROR_BAD_GPOS: |
| 573 case authpolicy::ERROR_LOCAL_IO: | 577 case authpolicy::ERROR_LOCAL_IO: |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 971 SigninScreenHandlerDelegate* GaiaScreenHandler::Delegate() { | 975 SigninScreenHandlerDelegate* GaiaScreenHandler::Delegate() { |
| 972 return signin_screen_handler_->delegate_; | 976 return signin_screen_handler_->delegate_; |
| 973 } | 977 } |
| 974 | 978 |
| 975 bool GaiaScreenHandler::IsRestrictiveProxy() const { | 979 bool GaiaScreenHandler::IsRestrictiveProxy() const { |
| 976 return !disable_restrictive_proxy_check_for_test_ && | 980 return !disable_restrictive_proxy_check_for_test_ && |
| 977 !IsOnline(captive_portal_status_); | 981 !IsOnline(captive_portal_status_); |
| 978 } | 982 } |
| 979 | 983 |
| 980 } // namespace chromeos | 984 } // namespace chromeos |
| OLD | NEW |