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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
189 } | 189 } |
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 void FakeChromeUserManager::OnSessionInitialized(user_manager::User* user) { | |
emaxx
2017/02/23 21:45:25
nit: Add an empty line before?
Andrew T Wilson (Slow)
2017/02/24 16:15:15
Done.
| |
200 user->set_session_initialized(true); | |
201 } | |
199 | 202 |
200 void FakeChromeUserManager::RemoveUser( | 203 void FakeChromeUserManager::RemoveUser( |
201 const AccountId& account_id, | 204 const AccountId& account_id, |
202 user_manager::RemoveUserDelegate* delegate) {} | 205 user_manager::RemoveUserDelegate* delegate) {} |
203 | 206 |
204 void FakeChromeUserManager::RemoveUserFromList(const AccountId& account_id) { | 207 void FakeChromeUserManager::RemoveUserFromList(const AccountId& account_id) { |
205 WallpaperManager::Get()->RemoveUserWallpaperInfo(account_id); | 208 WallpaperManager::Get()->RemoveUserWallpaperInfo(account_id); |
206 chromeos::ProfileHelper::Get()->RemoveUserFromListForTesting(account_id); | 209 chromeos::ProfileHelper::Get()->RemoveUserFromListForTesting(account_id); |
207 | 210 |
208 const user_manager::UserList::iterator it = | 211 const user_manager::UserList::iterator it = |
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
626 if (active_account_id_.is_valid()) { | 629 if (active_account_id_.is_valid()) { |
627 for (const auto& user : users_) { | 630 for (const auto& user : users_) { |
628 if (user->GetAccountId() == active_account_id_) | 631 if (user->GetAccountId() == active_account_id_) |
629 return user; | 632 return user; |
630 } | 633 } |
631 } | 634 } |
632 return users_[0]; | 635 return users_[0]; |
633 } | 636 } |
634 | 637 |
635 } // namespace chromeos | 638 } // namespace chromeos |
OLD | NEW |