Chromium Code Reviews| 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 "chrome/browser/chromeos/login/users/chrome_user_manager_interface.h" | |
| 9 #include "components/user_manager/user.h" | 10 #include "components/user_manager/user.h" |
|
ygorshenin1
2015/01/20 18:33:40
It seems that you don't need to include "component
merkulova
2015/01/21 14:10:33
Done.
| |
| 10 #include "components/user_manager/user_manager_base.h" | 11 #include "components/user_manager/user_manager_base.h" |
| 11 | 12 |
| 12 namespace base { | |
| 13 class TaskRunner; | |
| 14 } | |
| 15 | |
| 16 namespace chromeos { | 13 namespace chromeos { |
| 17 | 14 |
| 18 class MultiProfileUserController; | |
| 19 class SupervisedUserManager; | |
| 20 class UserFlow; | |
| 21 class UserImageManager; | |
| 22 | |
| 23 // Chrome specific interface of the UserManager. | 15 // Chrome specific interface of the UserManager. |
| 24 class ChromeUserManager : public user_manager::UserManagerBase { | 16 class ChromeUserManager : public user_manager::UserManagerBase, |
| 17 public ChromeUserManagerInterface { | |
| 25 public: | 18 public: |
| 26 ChromeUserManager(scoped_refptr<base::TaskRunner> task_runner, | 19 ChromeUserManager(scoped_refptr<base::TaskRunner> task_runner, |
|
ygorshenin1
2015/01/20 18:33:40
#include "base/memory/ref_counted.h"
#include "bas
merkulova
2015/01/21 14:10:33
Done.
| |
| 27 scoped_refptr<base::TaskRunner> blocking_task_runner); | 20 scoped_refptr<base::TaskRunner> blocking_task_runner); |
| 28 ~ChromeUserManager() override; | 21 ~ChromeUserManager() override; |
| 29 | 22 |
| 30 // Returns current ChromeUserManager or NULL if instance hasn't been | 23 // Returns current ChromeUserManager or NULL if instance hasn't been |
| 31 // yet initialized. | 24 // yet initialized. |
| 32 static ChromeUserManager* Get(); | 25 static ChromeUserManager* Get(); |
| 33 | 26 |
| 34 // Helper method for sorting out of user list only users that can create | |
| 35 // supervised users. | |
| 36 static user_manager::UserList GetUsersAllowedAsSupervisedUserManagers( | |
| 37 const user_manager::UserList& user_list); | |
| 38 | |
| 39 virtual MultiProfileUserController* GetMultiProfileUserController() = 0; | |
| 40 virtual UserImageManager* GetUserImageManager(const std::string& user_id) = 0; | |
| 41 virtual SupervisedUserManager* GetSupervisedUserManager() = 0; | |
| 42 | |
| 43 // Method that allows to set |flow| for user identified by |user_id|. | |
| 44 // Flow should be set before login attempt. | |
| 45 // Takes ownership of the |flow|, |flow| will be deleted in case of login | |
| 46 // failure. | |
| 47 virtual void SetUserFlow(const std::string& user_id, UserFlow* flow) = 0; | |
| 48 | |
| 49 // Return user flow for current user. Returns instance of DefaultUserFlow if | |
| 50 // no flow was defined for current user, or user is not logged in. | |
| 51 // Returned value should not be cached. | |
| 52 virtual UserFlow* GetCurrentUserFlow() const = 0; | |
| 53 | |
| 54 // Return user flow for user identified by |user_id|. Returns instance of | |
| 55 // DefaultUserFlow if no flow was defined for user. | |
| 56 // Returned value should not be cached. | |
| 57 virtual UserFlow* GetUserFlow(const std::string& user_id) const = 0; | |
| 58 | |
| 59 // Resets user flow for user identified by |user_id|. | |
| 60 virtual void ResetUserFlow(const std::string& user_id) = 0; | |
| 61 | |
| 62 DISALLOW_COPY_AND_ASSIGN(ChromeUserManager); | 27 DISALLOW_COPY_AND_ASSIGN(ChromeUserManager); |
| 63 }; | 28 }; |
| 64 | 29 |
| 65 } // namespace chromeos | 30 } // namespace chromeos |
| 66 | 31 |
| 67 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_CHROME_USER_MANAGER_H_ | 32 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_CHROME_USER_MANAGER_H_ |
| OLD | NEW |