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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USERS_CHROME_USER_MANAGER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_CHROME_USER_MANAGER_H_
8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h"
10 #include "base/task_runner.h"
11 #include "chrome/browser/chromeos/login/users/affiliation.h"
12 #include "chrome/browser/chromeos/login/users/user_manager_interface.h"
13 #include "components/user_manager/user_manager_base.h"
17 // Chrome specific interface of the UserManager.
18 class ChromeUserManager
: public user_manager::UserManagerBase
,
19 public UserManagerInterface
{
21 ChromeUserManager(scoped_refptr
<base::TaskRunner
> task_runner
,
22 scoped_refptr
<base::TaskRunner
> blocking_task_runner
);
23 ~ChromeUserManager() override
;
25 // Returns current ChromeUserManager or NULL if instance hasn't been
27 static ChromeUserManager
* Get();
29 // Helper method for sorting out of user list only users that can create
31 static user_manager::UserList
GetUsersAllowedAsSupervisedUserManagers(
32 const user_manager::UserList
& user_list
);
34 // Sets affiliation status for the user |user_id| judging by
35 // |user_affiliation_ids| and device affiliation IDs.
36 virtual void SetUserAffiliation(
37 const std::string
& user_email
,
38 const AffiliationIDSet
& user_affiliation_ids
) = 0;
40 // Return whether the given user should be reported (see
41 // policy::DeviceStatusCollector).
42 virtual bool ShouldReportUser(const std::string
& user_id
) const = 0;
44 DISALLOW_COPY_AND_ASSIGN(ChromeUserManager
);
47 } // namespace chromeos
49 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_CHROME_USER_MANAGER_H_