OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USERS_USER_MANAGER_INTERFACE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USERS_USER_MANAGER_INTERFACE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_USER_MANAGER_INTERFACE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_USER_MANAGER_INTERFACE_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "components/user_manager/user.h" | 9 #include "components/user_manager/user.h" |
10 #include "components/user_manager/user_type.h" | 10 #include "components/user_manager/user_type.h" |
11 | 11 |
12 class AccountId; | |
13 | |
12 namespace chromeos { | 14 namespace chromeos { |
13 | 15 |
14 class BootstrapManager; | 16 class BootstrapManager; |
15 class MultiProfileUserController; | 17 class MultiProfileUserController; |
16 class SupervisedUserManager; | 18 class SupervisedUserManager; |
17 class UserFlow; | 19 class UserFlow; |
18 class UserImageManager; | 20 class UserImageManager; |
19 | 21 |
20 // Chrome specific add-ons interface for the UserManager. | 22 // Chrome specific add-ons interface for the UserManager. |
21 class UserManagerInterface { | 23 class UserManagerInterface { |
22 public: | 24 public: |
23 UserManagerInterface() {} | 25 UserManagerInterface() {} |
24 virtual ~UserManagerInterface() {} | 26 virtual ~UserManagerInterface() {} |
25 | 27 |
26 virtual BootstrapManager* GetBootstrapManager() = 0; | 28 virtual BootstrapManager* GetBootstrapManager() = 0; |
27 virtual MultiProfileUserController* GetMultiProfileUserController() = 0; | 29 virtual MultiProfileUserController* GetMultiProfileUserController() = 0; |
28 virtual UserImageManager* GetUserImageManager(const std::string& user_id) = 0; | 30 virtual UserImageManager* GetUserImageManager(const AccountId& user_id) = 0; |
achuithb
2015/10/23 00:08:51
account_id, here and below
Alexander Alekseev
2015/10/23 09:11:23
Done.
| |
29 virtual SupervisedUserManager* GetSupervisedUserManager() = 0; | 31 virtual SupervisedUserManager* GetSupervisedUserManager() = 0; |
30 | 32 |
31 // Method that allows to set |flow| for user identified by |user_id|. | 33 // Method that allows to set |flow| for user identified by |user_id|. |
32 // Flow should be set before login attempt. | 34 // Flow should be set before login attempt. |
33 // Takes ownership of the |flow|, |flow| will be deleted in case of login | 35 // Takes ownership of the |flow|, |flow| will be deleted in case of login |
34 // failure. | 36 // failure. |
35 virtual void SetUserFlow(const std::string& user_id, UserFlow* flow) = 0; | 37 virtual void SetUserFlow(const AccountId& user_id, UserFlow* flow) = 0; |
36 | 38 |
37 // Return user flow for current user. Returns instance of DefaultUserFlow if | 39 // 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. | 40 // no flow was defined for current user, or user is not logged in. |
39 // Returned value should not be cached. | 41 // Returned value should not be cached. |
40 virtual UserFlow* GetCurrentUserFlow() const = 0; | 42 virtual UserFlow* GetCurrentUserFlow() const = 0; |
41 | 43 |
42 // Return user flow for user identified by |user_id|. Returns instance of | 44 // Return user flow for user identified by |user_id|. Returns instance of |
43 // DefaultUserFlow if no flow was defined for user. | 45 // DefaultUserFlow if no flow was defined for user. |
44 // Returned value should not be cached. | 46 // Returned value should not be cached. |
45 virtual UserFlow* GetUserFlow(const std::string& user_id) const = 0; | 47 virtual UserFlow* GetUserFlow(const AccountId& user_id) const = 0; |
46 | 48 |
47 // Resets user flow for user identified by |user_id|. | 49 // Resets user flow for user identified by |user_id|. |
48 virtual void ResetUserFlow(const std::string& user_id) = 0; | 50 virtual void ResetUserFlow(const AccountId& user_id) = 0; |
49 | 51 |
50 // Returns list of users allowed for supervised user creation. | 52 // Returns list of users allowed for supervised user creation. |
51 // Returns an empty list in cases when supervised user creation or adding new | 53 // Returns an empty list in cases when supervised user creation or adding new |
52 // users is restricted. | 54 // users is restricted. |
53 virtual user_manager::UserList GetUsersAllowedForSupervisedUsersCreation() | 55 virtual user_manager::UserList GetUsersAllowedForSupervisedUsersCreation() |
54 const = 0; | 56 const = 0; |
55 | 57 |
56 DISALLOW_COPY_AND_ASSIGN(UserManagerInterface); | 58 DISALLOW_COPY_AND_ASSIGN(UserManagerInterface); |
57 }; | 59 }; |
58 | 60 |
59 } // namespace chromeos | 61 } // namespace chromeos |
60 | 62 |
61 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_USER_MANAGER_INTERFACE_H_ | 63 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_USER_MANAGER_INTERFACE_H_ |
OLD | NEW |