| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_MULTI_PROFILE_USER_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MULTI_PROFILE_USER_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MULTI_PROFILE_USER_CONTROLLER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_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 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 static void RegisterPrefs(PrefRegistrySimple* registry); | 37 static void RegisterPrefs(PrefRegistrySimple* registry); |
| 38 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 38 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| 39 | 39 |
| 40 // Returns true if the user is allowed to be in the current session. | 40 // Returns true if the user is allowed to be in the current session. |
| 41 bool IsUserAllowedInSession(const std::string& user_email) const; | 41 bool IsUserAllowedInSession(const std::string& user_email) const; |
| 42 | 42 |
| 43 // Starts to observe the multiprofile user behavior pref of the given profile. | 43 // Starts to observe the multiprofile user behavior pref of the given profile. |
| 44 void StartObserving(Profile* user_profile); | 44 void StartObserving(Profile* user_profile); |
| 45 | 45 |
| 46 // Removes the cached value for the given user. | 46 // Removes the cached values for the given user. |
| 47 void RemoveCachedValue(const std::string& user_email); | 47 void RemoveCachedValues(const std::string& user_email); |
| 48 | 48 |
| 49 // Possible behavior values. | 49 // Possible behavior values. |
| 50 static const char kBehaviorUnrestricted[]; | 50 static const char kBehaviorUnrestricted[]; |
| 51 static const char kBehaviorPrimaryOnly[]; | 51 static const char kBehaviorPrimaryOnly[]; |
| 52 static const char kBehaviorNotAllowed[]; | 52 static const char kBehaviorNotAllowed[]; |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 friend class MultiProfileUserControllerTest; | 55 friend class MultiProfileUserControllerTest; |
| 56 | 56 |
| 57 // Gets/sets the cached policy value. | 57 // Gets/sets the cached policy value. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 68 MultiProfileUserControllerDelegate* delegate_; // Not owned. | 68 MultiProfileUserControllerDelegate* delegate_; // Not owned. |
| 69 PrefService* local_state_; // Not owned. | 69 PrefService* local_state_; // Not owned. |
| 70 ScopedVector<PrefChangeRegistrar> pref_watchers_; | 70 ScopedVector<PrefChangeRegistrar> pref_watchers_; |
| 71 | 71 |
| 72 DISALLOW_COPY_AND_ASSIGN(MultiProfileUserController); | 72 DISALLOW_COPY_AND_ASSIGN(MultiProfileUserController); |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 } // namespace chromeos | 75 } // namespace chromeos |
| 76 | 76 |
| 77 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MULTI_PROFILE_USER_CONTROLLER_H_ | 77 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MULTI_PROFILE_USER_CONTROLLER_H_ |
| OLD | NEW |