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

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

Issue 420243002: Refactoring IsUserAllowedInSession and GetCachedValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 4 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 2a34f96708dd2c2f1c3bd65c6ab275b41102a956..628a9556212071eaeff7e8ba0391e71281003af4 100644
--- a/chrome/browser/chromeos/login/users/multi_profile_user_controller.h
+++ b/chrome/browser/chromeos/login/users/multi_profile_user_controller.h
@@ -30,8 +30,8 @@ class UserManager;
// user login and checks if the meaning of the value is respected.
class MultiProfileUserController {
public:
- // Return value of IsUserAllowedInSession().
- enum UserAllowedInSessionResult {
+ // Second return value of IsUserAllowedInSession().
+ enum UserAllowedInSessionReason {
// User is allowed in multi-profile session.
ALLOWED,
@@ -65,10 +65,10 @@ class MultiProfileUserController {
// Returns the cached policy value for |user_email|.
std::string GetCachedValue(const std::string& user_email) const;
- // Returns UserAllowedInSessionResult enum that describe whether the user is
- // allowed to be in the current session.
- UserAllowedInSessionResult IsUserAllowedInSession(
- const std::string& user_email) const;
+ // 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,
+ UserAllowedInSessionReason* reason) const;
// Starts to observe the multiprofile user behavior pref of the given profile.
void StartObserving(Profile* user_profile);

Powered by Google App Engine
This is Rietveld 408576698