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/users/fake_user_manager.h" | 5 #include "chrome/browser/chromeos/login/users/fake_user_manager.h" |
6 | 6 |
7 #include "base/task_runner.h" | 7 #include "base/task_runner.h" |
8 #include "chrome/browser/chromeos/login/users/fake_supervised_user_manager.h" | 8 #include "chrome/browser/chromeos/login/users/fake_supervised_user_manager.h" |
9 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 9 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
10 #include "chrome/grit/theme_resources.h" | 10 #include "chrome/grit/theme_resources.h" |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 for (user_manager::UserList::const_iterator it = user_list_.begin(); | 106 for (user_manager::UserList::const_iterator it = user_list_.begin(); |
107 it != user_list_.end(); | 107 it != user_list_.end(); |
108 ++it) { | 108 ++it) { |
109 if ((*it)->GetType() == user_manager::USER_TYPE_REGULAR && | 109 if ((*it)->GetType() == user_manager::USER_TYPE_REGULAR && |
110 !(*it)->is_logged_in()) | 110 !(*it)->is_logged_in()) |
111 result.push_back(*it); | 111 result.push_back(*it); |
112 } | 112 } |
113 return result; | 113 return result; |
114 } | 114 } |
115 | 115 |
| 116 user_manager::UserList |
| 117 FakeUserManager::GetUsersAllowedForSupervisedUsersCreation() const { |
| 118 return ChromeUserManager::GetUsersAllowedAsSupervisedUserManagers(user_list_); |
| 119 } |
| 120 |
116 const user_manager::UserList& FakeUserManager::GetLoggedInUsers() const { | 121 const user_manager::UserList& FakeUserManager::GetLoggedInUsers() const { |
117 return logged_in_users_; | 122 return logged_in_users_; |
118 } | 123 } |
119 | 124 |
120 void FakeUserManager::UserLoggedIn(const std::string& email, | 125 void FakeUserManager::UserLoggedIn(const std::string& email, |
121 const std::string& username_hash, | 126 const std::string& username_hash, |
122 bool browser_restart) { | 127 bool browser_restart) { |
123 for (user_manager::UserList::const_iterator it = user_list_.begin(); | 128 for (user_manager::UserList::const_iterator it = user_list_.begin(); |
124 it != user_list_.end(); | 129 it != user_list_.end(); |
125 ++it) { | 130 ++it) { |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 bool FakeUserManager::IsKioskApp(const std::string& user_id) const { | 346 bool FakeUserManager::IsKioskApp(const std::string& user_id) const { |
342 return false; | 347 return false; |
343 } | 348 } |
344 | 349 |
345 bool FakeUserManager::IsPublicAccountMarkedForRemoval( | 350 bool FakeUserManager::IsPublicAccountMarkedForRemoval( |
346 const std::string& user_id) const { | 351 const std::string& user_id) const { |
347 return false; | 352 return false; |
348 } | 353 } |
349 | 354 |
350 } // namespace chromeos | 355 } // namespace chromeos |
OLD | NEW |