Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / chromeos / login / users / chrome_user_manager.cc
blobd2c6a7d1ce8c50290ea33b4568975e41d306a67b
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
3 // found in the LICENSE file.
5 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h"
6 #include "components/user_manager/user.h"
7 #include "components/user_manager/user_manager.h"
9 namespace chromeos {
11 ChromeUserManager::ChromeUserManager(
12 scoped_refptr<base::TaskRunner> task_runner,
13 scoped_refptr<base::TaskRunner> blocking_task_runner)
14 : UserManagerBase(task_runner, blocking_task_runner) {
17 ChromeUserManager::~ChromeUserManager() {
20 // static
21 ChromeUserManager* ChromeUserManager::Get() {
22 user_manager::UserManager* user_manager = user_manager::UserManager::Get();
23 return user_manager ? static_cast<ChromeUserManager*>(user_manager) : NULL;
26 // static
27 user_manager::UserList
28 ChromeUserManager::GetUsersAllowedAsSupervisedUserManagers(
29 const user_manager::UserList& user_list) {
30 user_manager::UserList result;
31 for (user_manager::User* user : user_list) {
32 if (user->GetType() == user_manager::USER_TYPE_REGULAR)
33 result.push_back(user);
35 return result;
38 } // namespace chromeos