| 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 <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 base::ListValue users_list; | 363 base::ListValue users_list; |
| 364 | 364 |
| 365 // TODO(nkostylev): Move to a separate method in UserManager. | 365 // TODO(nkostylev): Move to a separate method in UserManager. |
| 366 // http://crbug.com/230852 | 366 // http://crbug.com/230852 |
| 367 bool single_user = users_.size() == 1; | 367 bool single_user = users_.size() == 1; |
| 368 bool is_signin_to_add = LoginDisplayHost::default_host() && | 368 bool is_signin_to_add = LoginDisplayHost::default_host() && |
| 369 user_manager::UserManager::Get()->IsUserLoggedIn(); | 369 user_manager::UserManager::Get()->IsUserLoggedIn(); |
| 370 std::string owner_email; | 370 std::string owner_email; |
| 371 chromeos::CrosSettings::Get()->GetString(chromeos::kDeviceOwner, | 371 chromeos::CrosSettings::Get()->GetString(chromeos::kDeviceOwner, |
| 372 &owner_email); | 372 &owner_email); |
| 373 const AccountId owner = | 373 const AccountId owner = user_manager::known_user::GetAccountId( |
| 374 user_manager::known_user::GetAccountId(owner_email, std::string()); | 374 owner_email, std::string() /* gaia_id */, |
| 375 std::string() /* account_type */); |
| 375 | 376 |
| 376 policy::BrowserPolicyConnectorChromeOS* connector = | 377 policy::BrowserPolicyConnectorChromeOS* connector = |
| 377 g_browser_process->platform_part()->browser_policy_connector_chromeos(); | 378 g_browser_process->platform_part()->browser_policy_connector_chromeos(); |
| 378 bool is_enterprise_managed = connector->IsEnterpriseManaged(); | 379 bool is_enterprise_managed = connector->IsEnterpriseManaged(); |
| 379 | 380 |
| 380 const user_manager::UserList users_to_send = | 381 const user_manager::UserList users_to_send = |
| 381 PrepareUserListForSending(users_, owner, is_signin_to_add); | 382 PrepareUserListForSending(users_, owner, is_signin_to_add); |
| 382 | 383 |
| 383 user_auth_type_map_.clear(); | 384 user_auth_type_map_.clear(); |
| 384 | 385 |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 568 // The user profile should exist if and only if this is the lock screen. | 569 // The user profile should exist if and only if this is the lock screen. |
| 569 DCHECK_EQ(!!profile, GetScreenType() == LOCK_SCREEN); | 570 DCHECK_EQ(!!profile, GetScreenType() == LOCK_SCREEN); |
| 570 | 571 |
| 571 if (!profile) | 572 if (!profile) |
| 572 profile = profile_helper->GetSigninProfile(); | 573 profile = profile_helper->GetSigninProfile(); |
| 573 | 574 |
| 574 return EasyUnlockService::Get(profile); | 575 return EasyUnlockService::Get(profile); |
| 575 } | 576 } |
| 576 | 577 |
| 577 } // namespace chromeos | 578 } // namespace chromeos |
| OLD | NEW |