Index: chrome/browser/chromeos/login/users/chrome_user_manager_interface.h |
diff --git a/chrome/browser/chromeos/login/users/chrome_user_manager.h b/chrome/browser/chromeos/login/users/chrome_user_manager_interface.h |
similarity index 66% |
copy from chrome/browser/chromeos/login/users/chrome_user_manager.h |
copy to chrome/browser/chromeos/login/users/chrome_user_manager_interface.h |
index 5ec3b8fda71ec34eb7cc859a3146bcdf73dc4759..2d3674d65b9d4887d3e390afec92c36c7ee8e456 100644 |
--- a/chrome/browser/chromeos/login/users/chrome_user_manager.h |
+++ b/chrome/browser/chromeos/login/users/chrome_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_CHROME_USER_MANAGER_INTERFACE_H_ |
+#define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_CHROME_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 ChromeUserManagerInterface { |
sky
2015/01/22 18:46:02
Shouldn't this be named ChromeOSUserManagerInterfa
merkulova
2015/01/23 12:59:09
1. Yes, it's ChromeOS related. I kept Chrome-names
sky
2015/01/23 17:51:44
Not all chromeos specific classes have chromeos in
Daniel Erat
2015/01/23 17:57:49
(i agree with scott here. this is already in a chr
merkulova
2015/01/26 13:59:42
Done.
|
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); |
+ ChromeUserManagerInterface() {} |
+ virtual ~ChromeUserManagerInterface() {} |
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(ChromeUserManagerInterface); |
}; |
} // namespace chromeos |
-#endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_CHROME_USER_MANAGER_H_ |
+#endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_CHROME_USER_MANAGER_INTERFACE_H_ |