| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USERS_MULTI_PROFILE_USER_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USERS_MULTI_PROFILE_USER_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_MULTI_PROFILE_USER_CONTROLLER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_MULTI_PROFILE_USER_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 MultiProfileUserController(MultiProfileUserControllerDelegate* delegate, | 58 MultiProfileUserController(MultiProfileUserControllerDelegate* delegate, |
| 59 PrefService* local_state); | 59 PrefService* local_state); |
| 60 ~MultiProfileUserController(); | 60 ~MultiProfileUserController(); |
| 61 | 61 |
| 62 static void RegisterPrefs(PrefRegistrySimple* registry); | 62 static void RegisterPrefs(PrefRegistrySimple* registry); |
| 63 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 63 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| 64 | 64 |
| 65 // Returns the cached policy value for |user_email|. | 65 // Returns the cached policy value for |user_email|. |
| 66 std::string GetCachedValue(const std::string& user_email) const; | 66 std::string GetCachedValue(const std::string& user_email) const; |
| 67 | 67 |
| 68 // Returns primary user policy (only ALLOW, |
| 69 // NOT_ALLOWED_PRIMARY_POLICY_CERT_TAINTED, |
| 70 // NOT_ALLOWED_PRIMARY_USER_POLICY_FORBIDS) |
| 71 static UserAllowedInSessionReason GetPrimaryUserPolicy(); |
| 72 |
| 68 // Returns true if user allowed to be in the current session. If |reason| not | 73 // Returns true if user allowed to be in the current session. If |reason| not |
| 69 // null stores UserAllowedInSessionReason enum that describes actual reason. | 74 // null stores UserAllowedInSessionReason enum that describes actual reason. |
| 70 bool IsUserAllowedInSession(const std::string& user_email, | 75 bool IsUserAllowedInSession(const std::string& user_email, |
| 71 UserAllowedInSessionReason* reason) const; | 76 UserAllowedInSessionReason* reason) const; |
| 72 | 77 |
| 73 // Starts to observe the multiprofile user behavior pref of the given profile. | 78 // Starts to observe the multiprofile user behavior pref of the given profile. |
| 74 void StartObserving(Profile* user_profile); | 79 void StartObserving(Profile* user_profile); |
| 75 | 80 |
| 76 // Removes the cached values for the given user. | 81 // Removes the cached values for the given user. |
| 77 void RemoveCachedValues(const std::string& user_email); | 82 void RemoveCachedValues(const std::string& user_email); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 98 MultiProfileUserControllerDelegate* delegate_; // Not owned. | 103 MultiProfileUserControllerDelegate* delegate_; // Not owned. |
| 99 PrefService* local_state_; // Not owned. | 104 PrefService* local_state_; // Not owned. |
| 100 ScopedVector<PrefChangeRegistrar> pref_watchers_; | 105 ScopedVector<PrefChangeRegistrar> pref_watchers_; |
| 101 | 106 |
| 102 DISALLOW_COPY_AND_ASSIGN(MultiProfileUserController); | 107 DISALLOW_COPY_AND_ASSIGN(MultiProfileUserController); |
| 103 }; | 108 }; |
| 104 | 109 |
| 105 } // namespace chromeos | 110 } // namespace chromeos |
| 106 | 111 |
| 107 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_MULTI_PROFILE_USER_CONTROLLER_H_ | 112 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_MULTI_PROFILE_USER_CONTROLLER_H_ |
| OLD | NEW |