| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/users/fake_chrome_user_manager.h" | 5 #include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 } | 190 } |
| 191 } | 191 } |
| 192 } | 192 } |
| 193 | 193 |
| 194 const AccountId& FakeChromeUserManager::GetOwnerAccountId() const { | 194 const AccountId& FakeChromeUserManager::GetOwnerAccountId() const { |
| 195 return owner_account_id_; | 195 return owner_account_id_; |
| 196 } | 196 } |
| 197 | 197 |
| 198 void FakeChromeUserManager::OnSessionStarted() {} | 198 void FakeChromeUserManager::OnSessionStarted() {} |
| 199 | 199 |
| 200 void FakeChromeUserManager::OnProfileInitialized(user_manager::User* user) { |
| 201 user->set_profile_ever_initialized(true); |
| 202 } |
| 203 |
| 200 void FakeChromeUserManager::RemoveUser( | 204 void FakeChromeUserManager::RemoveUser( |
| 201 const AccountId& account_id, | 205 const AccountId& account_id, |
| 202 user_manager::RemoveUserDelegate* delegate) {} | 206 user_manager::RemoveUserDelegate* delegate) {} |
| 203 | 207 |
| 204 void FakeChromeUserManager::RemoveUserFromList(const AccountId& account_id) { | 208 void FakeChromeUserManager::RemoveUserFromList(const AccountId& account_id) { |
| 205 WallpaperManager::Get()->RemoveUserWallpaperInfo(account_id); | 209 WallpaperManager::Get()->RemoveUserWallpaperInfo(account_id); |
| 206 chromeos::ProfileHelper::Get()->RemoveUserFromListForTesting(account_id); | 210 chromeos::ProfileHelper::Get()->RemoveUserFromListForTesting(account_id); |
| 207 | 211 |
| 208 const user_manager::UserList::iterator it = | 212 const user_manager::UserList::iterator it = |
| 209 std::find_if(users_.begin(), users_.end(), | 213 std::find_if(users_.begin(), users_.end(), |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 626 if (active_account_id_.is_valid()) { | 630 if (active_account_id_.is_valid()) { |
| 627 for (auto* user : users_) { | 631 for (auto* user : users_) { |
| 628 if (user->GetAccountId() == active_account_id_) | 632 if (user->GetAccountId() == active_account_id_) |
| 629 return user; | 633 return user; |
| 630 } | 634 } |
| 631 } | 635 } |
| 632 return users_[0]; | 636 return users_[0]; |
| 633 } | 637 } |
| 634 | 638 |
| 635 } // namespace chromeos | 639 } // namespace chromeos |
| OLD | NEW |