OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_USER_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 // ... | 55 // ... |
56 // UserManager::Set(old_user_manager_); | 56 // UserManager::Set(old_user_manager_); |
57 // } | 57 // } |
58 // scoped_ptr<MockUserManager> mock_user_manager_; | 58 // scoped_ptr<MockUserManager> mock_user_manager_; |
59 // UserManager* old_user_manager_; | 59 // UserManager* old_user_manager_; |
60 static UserManager* Set(UserManager* mock); | 60 static UserManager* Set(UserManager* mock); |
61 | 61 |
62 // Registers user manager preferences. | 62 // Registers user manager preferences. |
63 static void RegisterPrefs(PrefService* local_state); | 63 static void RegisterPrefs(PrefService* local_state); |
64 | 64 |
| 65 // Indicates imminent shutdown, allowing the UserManager to remove any |
| 66 // observers it has registered. |
| 67 virtual void Shutdown() = 0; |
| 68 |
65 virtual ~UserManager(); | 69 virtual ~UserManager(); |
66 | 70 |
67 virtual UserImageManager* GetUserImageManager() = 0; | 71 virtual UserImageManager* GetUserImageManager() = 0; |
68 | 72 |
69 // Returns a list of users who have logged into this device previously. This | 73 // Returns a list of users who have logged into this device previously. This |
70 // is sorted by last login date with the most recent user at the beginning. | 74 // is sorted by last login date with the most recent user at the beginning. |
71 virtual const UserList& GetUsers() const = 0; | 75 virtual const UserList& GetUsers() const = 0; |
72 | 76 |
73 // Indicates that a user with the given email has just logged in. The | 77 // Indicates that a user with the given email has just logged in. The |
74 // persistent list is updated accordingly if the user is not ephemeral. | 78 // persistent list is updated accordingly if the user is not ephemeral. |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 | 184 |
181 virtual void AddObserver(Observer* obs) = 0; | 185 virtual void AddObserver(Observer* obs) = 0; |
182 virtual void RemoveObserver(Observer* obs) = 0; | 186 virtual void RemoveObserver(Observer* obs) = 0; |
183 | 187 |
184 virtual void NotifyLocalStateChanged() = 0; | 188 virtual void NotifyLocalStateChanged() = 0; |
185 }; | 189 }; |
186 | 190 |
187 } // namespace chromeos | 191 } // namespace chromeos |
188 | 192 |
189 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ | 193 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ |
OLD | NEW |