Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(940)

Unified Diff: components/user_manager/user_manager.h

Issue 720723002: Creating supervised users restricted for regular users if they are supervised. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@unicornUserTypePublic
Patch Set: Rebase. Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/user_manager/user_manager.h
diff --git a/components/user_manager/user_manager.h b/components/user_manager/user_manager.h
index 2935a6ef246643a0785114c0fca089a5cc4dc950..4c761fd1581bc08bb73fd20f2fb18115613cbfff 100644
--- a/components/user_manager/user_manager.h
+++ b/components/user_manager/user_manager.h
@@ -9,6 +9,7 @@
#include "components/user_manager/user.h"
#include "components/user_manager/user_manager_export.h"
+#include "components/user_manager/user_type.h"
namespace chromeos {
class ScopedUserManagerEnabler;
@@ -113,9 +114,14 @@ class USER_MANAGER_EXPORT UserManager {
// multi-profile session will still be part of this list as long as they
// are regular users (i.e. not a public session/supervised etc.).
// Returns an empty list in case when primary user is not a regular one or
- // has a policy that prohibids it to be part of multi-profile session.
+ // has a policy that prohibits it to be part of multi-profile session.
virtual UserList GetUsersAllowedForMultiProfile() const = 0;
+ // 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 UserList GetUsersAllowedForSupervisedUsersCreation() const = 0;
+
// Returns a list of users who are currently logged in.
virtual const UserList& GetLoggedInUsers() const = 0;
@@ -235,6 +241,11 @@ class USER_MANAGER_EXPORT UserManager {
// Otherwise, returns |user_id| itself.
virtual std::string GetUserDisplayEmail(const std::string& user_id) const = 0;
+ // Saves user's type for user |user_id| into local state preferences.
+ // Ignored If there is no such user.
+ virtual void SaveUserType(const std::string& user_id,
+ const UserType& user_type) = 0;
+
// Returns true if current user is an owner.
virtual bool IsCurrentUserOwner() const = 0;

Powered by Google App Engine
This is Rietveld 408576698