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

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

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.cc
diff --git a/chrome/browser/chromeos/login/users/multi_profile_user_controller.cc b/chrome/browser/chromeos/login/users/multi_profile_user_controller.cc
index 09b79b98b5d69b02caebd4ebd50e45b9a1828fbf..787e73e62ceaa573f9bfb60df3df22ed4ce54ebf 100644
--- a/chrome/browser/chromeos/login/users/multi_profile_user_controller.cc
+++ b/chrome/browser/chromeos/login/users/multi_profile_user_controller.cc
@@ -127,6 +127,20 @@ MultiProfileUserController::GetPrimaryUserPolicy() {
return ALLOWED;
}
+// static
+MultiProfileUserController::MultiProfileUserBehavior
+MultiProfileUserController::UserBehaviorStringToEnum(
+ const std::string& behavior) {
+ if (behavior == kBehaviorPrimaryOnly)
+ return MultiProfileUserBehavior::kPrimaryOnly;
+ if (behavior == kBehaviorNotAllowed)
+ return MultiProfileUserBehavior::kNotAllowed;
+ if (behavior == kBehaviorOwnerPrimaryOnly)
+ return MultiProfileUserBehavior::kOwnerPrimaryOnly;
+
+ return MultiProfileUserBehavior::kUnrestriced;
+}
+
bool MultiProfileUserController::IsUserAllowedInSession(
const std::string& user_email,
MultiProfileUserController::UserAllowedInSessionReason* reason) const {
« no previous file with comments | « chrome/browser/chromeos/login/users/multi_profile_user_controller.h ('k') | ui/login/account_picker/md_user_pod_row.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698