Chromium Code Reviews| 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 (user_manager::UserManager::Get()->FindGaiaID( | 837 if (!context.email.empty() && |
| 838 user_manager::UserManager::Get()->FindGaiaID( | |
| 838 AccountId::FromUserEmail(context.email), &gaia_id)) | 839 AccountId::FromUserEmail(context.email), &gaia_id)) |
| 839 context.gaia_id = gaia_id; | 840 context.gaia_id = gaia_id; |
|
stevenjb
2015/11/11 20:39:23
nit: Add {} while you're in here.
Alexander Alekseev
2015/11/12 06:53:04
Done.
| |
| 840 | 841 |
| 841 if (Delegate()) { | 842 if (Delegate()) { |
| 842 context.show_users = Delegate()->IsShowUsers(); | 843 context.show_users = Delegate()->IsShowUsers(); |
| 843 } | 844 } |
| 844 | 845 |
| 845 if (!context.email.empty()) { | 846 if (!context.email.empty()) { |
| 846 context.gaps_cookie = | 847 context.gaps_cookie = |
| 847 user_manager::UserManager::Get()->GetKnownUserGAPSCookie( | 848 user_manager::UserManager::Get()->GetKnownUserGAPSCookie( |
| 848 AccountId::FromUserEmail(gaia::CanonicalizeEmail(context.email))); | 849 AccountId::FromUserEmail(gaia::CanonicalizeEmail(context.email))); |
| 849 } | 850 } |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 865 bool GaiaScreenHandler::IsRestrictiveProxy() const { | 866 bool GaiaScreenHandler::IsRestrictiveProxy() const { |
| 866 return !disable_restrictive_proxy_check_for_test_ && | 867 return !disable_restrictive_proxy_check_for_test_ && |
| 867 !IsOnline(captive_portal_status_); | 868 !IsOnline(captive_portal_status_); |
| 868 } | 869 } |
| 869 | 870 |
| 870 void GaiaScreenHandler::DisableRestrictiveProxyCheckForTest() { | 871 void GaiaScreenHandler::DisableRestrictiveProxyCheckForTest() { |
| 871 disable_restrictive_proxy_check_for_test_ = true; | 872 disable_restrictive_proxy_check_for_test_ = true; |
| 872 } | 873 } |
| 873 | 874 |
| 874 } // namespace chromeos | 875 } // namespace chromeos |
| OLD | NEW |