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

Unified Diff: chrome/browser/chromeos/login/users/multi_profile_user_controller.h

Issue 2946463002: Convert multi-profile user behavior string to enum and send it to UI. (Closed)
Patch Set: Created 3 years, 6 months 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: chrome/browser/chromeos/login/users/multi_profile_user_controller.h
diff --git a/chrome/browser/chromeos/login/users/multi_profile_user_controller.h b/chrome/browser/chromeos/login/users/multi_profile_user_controller.h
index 5baf14ff85c235ff75f12c9dc378cee55f6cd886..c397d56e05aa12a0854e673f12714e8251ce73b4 100644
--- a/chrome/browser/chromeos/login/users/multi_profile_user_controller.h
+++ b/chrome/browser/chromeos/login/users/multi_profile_user_controller.h
@@ -55,6 +55,15 @@ class MultiProfileUserController {
NOT_ALLOWED_POLICY_FORBIDS
};
+ // Supported user behavior values. Keep in sync with the enum in
+ // md_user_pod_row.js and user_pod_row.js
+ enum class MultiProfileUserBehavior {
+ kUnrestriced,
+ kPrimaryOnly,
+ kNotAllowed,
+ kOwnerPrimaryOnly
+ };
+
MultiProfileUserController(MultiProfileUserControllerDelegate* delegate,
PrefService* local_state);
~MultiProfileUserController();
@@ -70,6 +79,10 @@ class MultiProfileUserController {
// NOT_ALLOWED_PRIMARY_USER_POLICY_FORBIDS)
static UserAllowedInSessionReason GetPrimaryUserPolicy();
+ // Returns the user behavior in MultiProfileUserBehavior enum.
+ static MultiProfileUserBehavior UserBehaviorStringToEnum(
+ const std::string& behavior);
+
// Returns true if user allowed to be in the current session. If |reason| not
// null stores UserAllowedInSessionReason enum that describes actual reason.
bool IsUserAllowedInSession(const std::string& user_email,

Powered by Google App Engine
This is Rietveld 408576698