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/system/chromeos/devicetype_utils.h" | 7 #include "ash/system/chromeos/devicetype_utils.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/guid.h" | 9 #include "base/guid.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
827 VLOG(1) << "LoadAuthExtension, force: " << force | 827 VLOG(1) << "LoadAuthExtension, force: " << force |
828 << ", offline: " << offline; | 828 << ", offline: " << offline; |
829 GaiaContext context; | 829 GaiaContext context; |
830 context.force_reload = force; | 830 context.force_reload = force; |
831 context.is_local = offline; | 831 context.is_local = offline; |
832 context.use_offline = offline; | 832 context.use_offline = offline; |
833 context.email = populated_email_; | 833 context.email = populated_email_; |
834 context.is_enrolling_consumer_management = is_enrolling_consumer_management_; | 834 context.is_enrolling_consumer_management = is_enrolling_consumer_management_; |
835 | 835 |
836 std::string gaia_id; | 836 std::string gaia_id; |
837 if (!context.email.empty() && | 837 if (user_manager::UserManager::Get()->FindGaiaID( |
838 user_manager::UserManager::Get()->FindGaiaID( | 838 AccountId::FromUserEmail(context.email), &gaia_id)) |
839 AccountId::FromUserEmail(context.email), &gaia_id)) { | |
840 context.gaia_id = gaia_id; | 839 context.gaia_id = gaia_id; |
841 } | |
842 | 840 |
843 if (Delegate()) { | 841 if (Delegate()) { |
844 context.show_users = Delegate()->IsShowUsers(); | 842 context.show_users = Delegate()->IsShowUsers(); |
845 } | 843 } |
846 | 844 |
847 if (!context.email.empty()) { | 845 if (!context.email.empty()) { |
848 context.gaps_cookie = | 846 context.gaps_cookie = |
849 user_manager::UserManager::Get()->GetKnownUserGAPSCookie( | 847 user_manager::UserManager::Get()->GetKnownUserGAPSCookie( |
850 AccountId::FromUserEmail(gaia::CanonicalizeEmail(context.email))); | 848 AccountId::FromUserEmail(gaia::CanonicalizeEmail(context.email))); |
851 } | 849 } |
(...skipping 15 matching lines...) Expand all Loading... |
867 bool GaiaScreenHandler::IsRestrictiveProxy() const { | 865 bool GaiaScreenHandler::IsRestrictiveProxy() const { |
868 return !disable_restrictive_proxy_check_for_test_ && | 866 return !disable_restrictive_proxy_check_for_test_ && |
869 !IsOnline(captive_portal_status_); | 867 !IsOnline(captive_portal_status_); |
870 } | 868 } |
871 | 869 |
872 void GaiaScreenHandler::DisableRestrictiveProxyCheckForTest() { | 870 void GaiaScreenHandler::DisableRestrictiveProxyCheckForTest() { |
873 disable_restrictive_proxy_check_for_test_ = true; | 871 disable_restrictive_proxy_check_for_test_ = true; |
874 } | 872 } |
875 | 873 |
876 } // namespace chromeos | 874 } // namespace chromeos |
OLD | NEW |