Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(241)

Side by Side Diff: chrome/browser/chromeos/login/users/fake_user_manager.cc

Issue 720723002: Creating supervised users restricted for regular users if they are supervised. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@unicornUserTypePublic
Patch Set: Rebase. Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/users/fake_user_manager.h ('k') | chrome/browser/chromeos/login/users/mock_user_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698