| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USERS_CHROME_USER_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USERS_CHROME_USER_MANAGER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_CHROME_USER_MANAGER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_CHROME_USER_MANAGER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/task_runner.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" | 11 #include "chrome/browser/chromeos/login/users/user_manager_interface.h" |
| 13 #include "components/user_manager/user_manager_base.h" | 12 #include "components/user_manager/user_manager_base.h" |
| 14 | 13 |
| 15 namespace chromeos { | 14 namespace chromeos { |
| 16 | 15 |
| 17 // Chrome specific interface of the UserManager. | 16 // Chrome specific interface of the UserManager. |
| 18 class ChromeUserManager : public user_manager::UserManagerBase, | 17 class ChromeUserManager : public user_manager::UserManagerBase, |
| 19 public UserManagerInterface { | 18 public UserManagerInterface { |
| 20 public: | 19 public: |
| 21 ChromeUserManager(scoped_refptr<base::TaskRunner> task_runner, | 20 ChromeUserManager(scoped_refptr<base::TaskRunner> task_runner, |
| 22 scoped_refptr<base::TaskRunner> blocking_task_runner); | 21 scoped_refptr<base::TaskRunner> blocking_task_runner); |
| 23 ~ChromeUserManager() override; | 22 ~ChromeUserManager() override; |
| 24 | 23 |
| 25 // Returns current ChromeUserManager or NULL if instance hasn't been | 24 // Returns current ChromeUserManager or NULL if instance hasn't been |
| 26 // yet initialized. | 25 // yet initialized. |
| 27 static ChromeUserManager* Get(); | 26 static ChromeUserManager* Get(); |
| 28 | 27 |
| 29 // Helper method for sorting out of user list only users that can create | 28 // Helper method for sorting out of user list only users that can create |
| 30 // supervised users. | 29 // supervised users. |
| 31 static user_manager::UserList GetUsersAllowedAsSupervisedUserManagers( | 30 static user_manager::UserList GetUsersAllowedAsSupervisedUserManagers( |
| 32 const user_manager::UserList& user_list); | 31 const user_manager::UserList& user_list); |
| 33 | 32 |
| 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; | |
| 39 | |
| 40 DISALLOW_COPY_AND_ASSIGN(ChromeUserManager); | 33 DISALLOW_COPY_AND_ASSIGN(ChromeUserManager); |
| 41 }; | 34 }; |
| 42 | 35 |
| 43 } // namespace chromeos | 36 } // namespace chromeos |
| 44 | 37 |
| 45 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_CHROME_USER_MANAGER_H_ | 38 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_CHROME_USER_MANAGER_H_ |
| OLD | NEW |