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

Unified Diff: components/user_manager/user.h

Issue 718673002: New user type introduced. Combines regular and supervised features. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments addressed. 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
« no previous file with comments | « chrome/browser/ui/ash/system_tray_delegate_chromeos.cc ('k') | components/user_manager/user.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/user_manager/user.h
diff --git a/components/user_manager/user.h b/components/user_manager/user.h
index 1a315534ad4b3530144969c88eff4f966d4ca3f5..c2deda46cc7afc6ee410533b412d35c77d00660f 100644
--- a/components/user_manager/user.h
+++ b/components/user_manager/user.h
@@ -75,6 +75,9 @@ class USER_MANAGER_EXPORT User : public UserInfo {
WALLPAPER_TYPE_COUNT = 6
};
+ // Returns true if user type is regular.
+ static bool TypeIsRegular(UserType user_type);
+
// Returns the user type.
virtual UserType GetType() const = 0;
@@ -91,10 +94,15 @@ class USER_MANAGER_EXPORT User : public UserInfo {
const gfx::ImageSkia& GetImage() const override;
std::string GetUserID() const override;
- // Is user supervised.
- virtual bool IsSupervised() const;
+ // Allows managing supervised status of the user. Used for RegularUser.
virtual void SetIsSupervised(bool is_supervised);
+ // Returns true if user is regular.
Nikita (slow) 2014/11/12 10:55:38 nit: mention that this is true for both USER_TYPE
Nikita (slow) 2014/11/12 10:56:32 One can easily think that these checks are identic
merkulova 2014/11/12 11:01:17 Done.
bartfab (slow) 2014/11/12 16:20:25 This actually bothered me about this CL from the s
+ virtual bool IsRegular() const;
+
+ // Returns true if user is supervised.
+ virtual bool IsSupervised() const;
+
// Returns the account name part of the email. Use the display form of the
// email if available and use_display_name == true. Otherwise use canonical.
std::string GetAccountName(bool use_display_email) const;
« no previous file with comments | « chrome/browser/ui/ash/system_tray_delegate_chromeos.cc ('k') | components/user_manager/user.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698