Index: chrome/browser/chromeos/login/users/user_manager_interface.h |
diff --git a/chrome/browser/chromeos/login/users/chrome_user_manager.h b/chrome/browser/chromeos/login/users/user_manager_interface.h |
similarity index 58% |
copy from chrome/browser/chromeos/login/users/chrome_user_manager.h |
copy to chrome/browser/chromeos/login/users/user_manager_interface.h |
index 5ec3b8fda71ec34eb7cc859a3146bcdf73dc4759..b17c5430e638d236d2764809072183572d9f1df0 100644 |
--- a/chrome/browser/chromeos/login/users/chrome_user_manager.h |
+++ b/chrome/browser/chromeos/login/users/user_manager_interface.h |
@@ -1,17 +1,13 @@ |
-// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USERS_CHROME_USER_MANAGER_H_ |
-#define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_CHROME_USER_MANAGER_H_ |
+#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USERS_USER_MANAGER_INTERFACE_H_ |
+#define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_USER_MANAGER_INTERFACE_H_ |
#include "base/basictypes.h" |
#include "components/user_manager/user.h" |
-#include "components/user_manager/user_manager_base.h" |
- |
-namespace base { |
-class TaskRunner; |
-} |
+#include "components/user_manager/user_type.h" |
namespace chromeos { |
@@ -20,21 +16,11 @@ class SupervisedUserManager; |
class UserFlow; |
class UserImageManager; |
-// Chrome specific interface of the UserManager. |
-class ChromeUserManager : public user_manager::UserManagerBase { |
+// Chrome specific add-ons interface for the UserManager. |
+class UserManagerInterface { |
public: |
- ChromeUserManager(scoped_refptr<base::TaskRunner> task_runner, |
- scoped_refptr<base::TaskRunner> blocking_task_runner); |
- ~ChromeUserManager() override; |
- |
- // Returns current ChromeUserManager or NULL if instance hasn't been |
- // yet initialized. |
- static ChromeUserManager* Get(); |
- |
- // Helper method for sorting out of user list only users that can create |
- // supervised users. |
- static user_manager::UserList GetUsersAllowedAsSupervisedUserManagers( |
- const user_manager::UserList& user_list); |
+ UserManagerInterface() {} |
+ virtual ~UserManagerInterface() {} |
virtual MultiProfileUserController* GetMultiProfileUserController() = 0; |
virtual UserImageManager* GetUserImageManager(const std::string& user_id) = 0; |
@@ -59,9 +45,15 @@ class ChromeUserManager : public user_manager::UserManagerBase { |
// Resets user flow for user identified by |user_id|. |
virtual void ResetUserFlow(const std::string& user_id) = 0; |
- DISALLOW_COPY_AND_ASSIGN(ChromeUserManager); |
+ // Returns list of users allowed for supervised user creation. |
+ // Returns an empty list in cases when supervised user creation or adding new |
+ // users is restricted. |
+ virtual user_manager::UserList GetUsersAllowedForSupervisedUsersCreation() |
+ const = 0; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(UserManagerInterface); |
}; |
} // namespace chromeos |
-#endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_CHROME_USER_MANAGER_H_ |
+#endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_USER_MANAGER_INTERFACE_H_ |