| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/chromeos/login/screens/chrome_user_selection_screen.h" | 5 #include "chrome/browser/chromeos/login/screens/chrome_user_selection_screen.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/location.h" | 11 #include "base/location.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/single_thread_task_runner.h" | 13 #include "base/single_thread_task_runner.h" |
| 14 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
| 15 #include "base/threading/thread_task_runner_handle.h" | 15 #include "base/threading/thread_task_runner_handle.h" |
| 16 #include "base/values.h" | 16 #include "base/values.h" |
| 17 #include "chrome/browser/browser_process.h" | 17 #include "chrome/browser/browser_process.h" |
| 18 #include "chrome/browser/browser_process_platform_part.h" | 18 #include "chrome/browser/browser_process_platform_part.h" |
| 19 #include "chrome/browser/chromeos/login/ui/views/user_board_view.h" | 19 #include "chrome/browser/chromeos/login/ui/views/user_board_view.h" |
| 20 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 20 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 21 #include "chrome/browser/ui/webui/chromeos/login/l10n_util.h" | 21 #include "chrome/browser/ui/webui/chromeos/login/l10n_util.h" |
| 22 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" | 22 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" |
| 23 #include "components/policy/core/common/cloud/cloud_policy_core.h" | 23 #include "components/policy/core/common/cloud/cloud_policy_core.h" |
| 24 #include "components/policy/core/common/cloud/cloud_policy_store.h" | 24 #include "components/policy/core/common/cloud/cloud_policy_store.h" |
| 25 #include "components/policy/core/common/policy_map.h" | 25 #include "components/policy/core/common/policy_map.h" |
| 26 #include "components/policy/core/common/policy_types.h" | 26 #include "components/policy/core/common/policy_types.h" |
| 27 #include "components/policy/policy_constants.h" |
| 27 #include "components/signin/core/account_id/account_id.h" | 28 #include "components/signin/core/account_id/account_id.h" |
| 28 #include "components/user_manager/known_user.h" | 29 #include "components/user_manager/known_user.h" |
| 29 #include "components/user_manager/user.h" | 30 #include "components/user_manager/user.h" |
| 30 #include "components/user_manager/user_manager.h" | 31 #include "components/user_manager/user_manager.h" |
| 31 #include "components/user_manager/user_type.h" | 32 #include "components/user_manager/user_type.h" |
| 32 #include "policy/policy_constants.h" | |
| 33 | 33 |
| 34 namespace chromeos { | 34 namespace chromeos { |
| 35 | 35 |
| 36 ChromeUserSelectionScreen::ChromeUserSelectionScreen( | 36 ChromeUserSelectionScreen::ChromeUserSelectionScreen( |
| 37 const std::string& display_type) | 37 const std::string& display_type) |
| 38 : UserSelectionScreen(display_type), | 38 : UserSelectionScreen(display_type), |
| 39 handler_initialized_(false), | 39 handler_initialized_(false), |
| 40 weak_factory_(this) { | 40 weak_factory_(this) { |
| 41 device_local_account_policy_service_ = g_browser_process->platform_part()-> | 41 device_local_account_policy_service_ = g_browser_process->platform_part()-> |
| 42 browser_policy_connector_chromeos()->GetDeviceLocalAccountPolicyService(); | 42 browser_policy_connector_chromeos()->GetDeviceLocalAccountPolicyService(); |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 // advanced form (two or more recommended locales). | 184 // advanced form (two or more recommended locales). |
| 185 const bool two_or_more_recommended_locales = recommended_locales.size() >= 2; | 185 const bool two_or_more_recommended_locales = recommended_locales.size() >= 2; |
| 186 | 186 |
| 187 // Notify the UI. | 187 // Notify the UI. |
| 188 view_->SetPublicSessionLocales(account_id, std::move(available_locales), | 188 view_->SetPublicSessionLocales(account_id, std::move(available_locales), |
| 189 default_locale, | 189 default_locale, |
| 190 two_or_more_recommended_locales); | 190 two_or_more_recommended_locales); |
| 191 } | 191 } |
| 192 | 192 |
| 193 } // namespace chromeos | 193 } // namespace chromeos |
| OLD | NEW |