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 | |
69 virtual ~UserManager(); | 65 virtual ~UserManager(); |
70 | 66 |
71 virtual UserImageManager* GetUserImageManager() = 0; | 67 virtual UserImageManager* GetUserImageManager() = 0; |
72 | 68 |
73 // Returns a list of users who have logged into this device previously. This | 69 // Returns a list of users who have logged into this device previously. This |
74 // is sorted by last login date with the most recent user at the beginning. | 70 // is sorted by last login date with the most recent user at the beginning. |
75 virtual const UserList& GetUsers() const = 0; | 71 virtual const UserList& GetUsers() const = 0; |
76 | 72 |
77 // Indicates that a user with the given email has just logged in. The | 73 // Indicates that a user with the given email has just logged in. The |
78 // persistent list is updated accordingly if the user is not ephemeral. | 74 // persistent list is updated accordingly if the user is not ephemeral. |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 | 180 |
185 virtual void AddObserver(Observer* obs) = 0; | 181 virtual void AddObserver(Observer* obs) = 0; |
186 virtual void RemoveObserver(Observer* obs) = 0; | 182 virtual void RemoveObserver(Observer* obs) = 0; |
187 | 183 |
188 virtual void NotifyLocalStateChanged() = 0; | 184 virtual void NotifyLocalStateChanged() = 0; |
189 }; | 185 }; |
190 | 186 |
191 } // namespace chromeos | 187 } // namespace chromeos |
192 | 188 |
193 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ | 189 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ |
OLD | NEW |