Chromium Code Reviews| 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 // static | |
|
Nikita (slow)
2014/11/12 11:09:09
nit: it's not static
merkulova
2014/11/12 13:19:51
Done.
| |
| 117 user_manager::UserList | |
| 118 FakeUserManager::GetUsersAllowedForSupervisedUsersCreation() const { | |
| 119 return ChromeUserManager::GetUsersAllowedAsSUManagers(user_list_); | |
| 120 } | |
| 121 | |
| 116 const user_manager::UserList& FakeUserManager::GetLoggedInUsers() const { | 122 const user_manager::UserList& FakeUserManager::GetLoggedInUsers() const { |
| 117 return logged_in_users_; | 123 return logged_in_users_; |
| 118 } | 124 } |
| 119 | 125 |
| 120 void FakeUserManager::UserLoggedIn(const std::string& email, | 126 void FakeUserManager::UserLoggedIn(const std::string& email, |
| 121 const std::string& username_hash, | 127 const std::string& username_hash, |
| 122 bool browser_restart) { | 128 bool browser_restart) { |
| 123 for (user_manager::UserList::const_iterator it = user_list_.begin(); | 129 for (user_manager::UserList::const_iterator it = user_list_.begin(); |
| 124 it != user_list_.end(); | 130 it != user_list_.end(); |
| 125 ++it) { | 131 ++it) { |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 341 bool FakeUserManager::IsKioskApp(const std::string& user_id) const { | 347 bool FakeUserManager::IsKioskApp(const std::string& user_id) const { |
| 342 return false; | 348 return false; |
| 343 } | 349 } |
| 344 | 350 |
| 345 bool FakeUserManager::IsPublicAccountMarkedForRemoval( | 351 bool FakeUserManager::IsPublicAccountMarkedForRemoval( |
| 346 const std::string& user_id) const { | 352 const std::string& user_id) const { |
| 347 return false; | 353 return false; |
| 348 } | 354 } |
| 349 | 355 |
| 350 } // namespace chromeos | 356 } // namespace chromeos |
| OLD | NEW |