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/user_selection_screen.h" | 5 #include "chrome/browser/chromeos/login/screens/user_selection_screen.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/prefs/pref_service.h" | 11 #include "base/prefs/pref_service.h" |
12 #include "base/values.h" | 12 #include "base/values.h" |
13 #include "chrome/browser/browser_process.h" | 13 #include "chrome/browser/browser_process.h" |
14 #include "chrome/browser/browser_process_platform_part.h" | 14 #include "chrome/browser/browser_process_platform_part.h" |
15 #include "chrome/browser/chromeos/login/lock/screen_locker.h" | 15 #include "chrome/browser/chromeos/login/lock/screen_locker.h" |
16 #include "chrome/browser/chromeos/login/reauth_stats.h" | 16 #include "chrome/browser/chromeos/login/reauth_stats.h" |
17 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" | 17 #include "chrome/browser/chromeos/login/ui/login_display_host.h" |
18 #include "chrome/browser/chromeos/login/ui/views/user_board_view.h" | 18 #include "chrome/browser/chromeos/login/ui/views/user_board_view.h" |
19 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" | 19 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" |
20 #include "chrome/browser/chromeos/login/users/multi_profile_user_controller.h" | 20 #include "chrome/browser/chromeos/login/users/multi_profile_user_controller.h" |
21 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 21 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
22 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 22 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
23 #include "chrome/browser/signin/easy_unlock_service.h" | 23 #include "chrome/browser/signin/easy_unlock_service.h" |
24 #include "chrome/browser/ui/webui/chromeos/login/l10n_util.h" | 24 #include "chrome/browser/ui/webui/chromeos/login/l10n_util.h" |
25 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" | 25 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" |
26 #include "components/proximity_auth/screenlock_bridge.h" | 26 #include "components/proximity_auth/screenlock_bridge.h" |
27 #include "components/signin/core/account_id/account_id.h" | 27 #include "components/signin/core/account_id/account_id.h" |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 } | 339 } |
340 return users_to_send; | 340 return users_to_send; |
341 } | 341 } |
342 | 342 |
343 void UserSelectionScreen::SendUserList() { | 343 void UserSelectionScreen::SendUserList() { |
344 base::ListValue users_list; | 344 base::ListValue users_list; |
345 | 345 |
346 // TODO(nkostylev): Move to a separate method in UserManager. | 346 // TODO(nkostylev): Move to a separate method in UserManager. |
347 // http://crbug.com/230852 | 347 // http://crbug.com/230852 |
348 bool single_user = users_.size() == 1; | 348 bool single_user = users_.size() == 1; |
349 bool is_signin_to_add = LoginDisplayHostImpl::default_host() && | 349 bool is_signin_to_add = LoginDisplayHost::default_host() && |
350 user_manager::UserManager::Get()->IsUserLoggedIn(); | 350 user_manager::UserManager::Get()->IsUserLoggedIn(); |
351 std::string owner_email; | 351 std::string owner_email; |
352 chromeos::CrosSettings::Get()->GetString(chromeos::kDeviceOwner, | 352 chromeos::CrosSettings::Get()->GetString(chromeos::kDeviceOwner, |
353 &owner_email); | 353 &owner_email); |
354 const AccountId owner = | 354 const AccountId owner = |
355 user_manager::known_user::GetAccountId(owner_email, std::string()); | 355 user_manager::known_user::GetAccountId(owner_email, std::string()); |
356 | 356 |
357 policy::BrowserPolicyConnectorChromeOS* connector = | 357 policy::BrowserPolicyConnectorChromeOS* connector = |
358 g_browser_process->platform_part()->browser_policy_connector_chromeos(); | 358 g_browser_process->platform_part()->browser_policy_connector_chromeos(); |
359 bool is_enterprise_managed = connector->IsEnterpriseManaged(); | 359 bool is_enterprise_managed = connector->IsEnterpriseManaged(); |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 // The user profile should exist if and only if this is the lock screen. | 552 // The user profile should exist if and only if this is the lock screen. |
553 DCHECK_EQ(!!profile, GetScreenType() == LOCK_SCREEN); | 553 DCHECK_EQ(!!profile, GetScreenType() == LOCK_SCREEN); |
554 | 554 |
555 if (!profile) | 555 if (!profile) |
556 profile = profile_helper->GetSigninProfile(); | 556 profile = profile_helper->GetSigninProfile(); |
557 | 557 |
558 return EasyUnlockService::Get(profile); | 558 return EasyUnlockService::Get(profile); |
559 } | 559 } |
560 | 560 |
561 } // namespace chromeos | 561 } // namespace chromeos |
OLD | NEW |