1 // Copyright 2015 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_USER_MANAGER_INTERFACE_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_USER_MANAGER_INTERFACE_H_
8 #include "base/basictypes.h"
9 #include "components/user_manager/user.h"
10 #include "components/user_manager/user_type.h"
14 class BootstrapManager
;
15 class MultiProfileUserController
;
16 class SupervisedUserManager
;
18 class UserImageManager
;
20 // Chrome specific add-ons interface for the UserManager.
21 class UserManagerInterface
{
23 UserManagerInterface() {}
24 virtual ~UserManagerInterface() {}
26 virtual BootstrapManager
* GetBootstrapManager() = 0;
27 virtual MultiProfileUserController
* GetMultiProfileUserController() = 0;
28 virtual UserImageManager
* GetUserImageManager(const std::string
& user_id
) = 0;
29 virtual SupervisedUserManager
* GetSupervisedUserManager() = 0;
31 // Method that allows to set |flow| for user identified by |user_id|.
32 // Flow should be set before login attempt.
33 // Takes ownership of the |flow|, |flow| will be deleted in case of login
35 virtual void SetUserFlow(const std::string
& user_id
, UserFlow
* flow
) = 0;
37 // Return user flow for current user. Returns instance of DefaultUserFlow if
38 // no flow was defined for current user, or user is not logged in.
39 // Returned value should not be cached.
40 virtual UserFlow
* GetCurrentUserFlow() const = 0;
42 // Return user flow for user identified by |user_id|. Returns instance of
43 // DefaultUserFlow if no flow was defined for user.
44 // Returned value should not be cached.
45 virtual UserFlow
* GetUserFlow(const std::string
& user_id
) const = 0;
47 // Resets user flow for user identified by |user_id|.
48 virtual void ResetUserFlow(const std::string
& user_id
) = 0;
50 // Returns list of users allowed for supervised user creation.
51 // Returns an empty list in cases when supervised user creation or adding new
52 // users is restricted.
53 virtual user_manager::UserList
GetUsersAllowedForSupervisedUsersCreation()
56 DISALLOW_COPY_AND_ASSIGN(UserManagerInterface
);
59 } // namespace chromeos
61 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_USER_MANAGER_INTERFACE_H_