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

Side by Side Diff: chrome/browser/chromeos/login/user_manager.h

Issue 11411314: Add public accounts to UserManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed reasons for the original revert. Created 8 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 // Returns true if the current user is ephemeral. 154 // Returns true if the current user is ephemeral.
151 virtual bool IsCurrentUserEphemeral() const = 0; 155 virtual bool IsCurrentUserEphemeral() const = 0;
152 156
153 // Returns true if the current user's session can be locked (i.e. the user has 157 // Returns true if the current user's session can be locked (i.e. the user has
154 // a password with which to unlock the session). 158 // a password with which to unlock the session).
155 virtual bool CanCurrentUserLock() const = 0; 159 virtual bool CanCurrentUserLock() const = 0;
156 160
157 // Returns true if user is signed in. 161 // Returns true if user is signed in.
158 virtual bool IsUserLoggedIn() const = 0; 162 virtual bool IsUserLoggedIn() const = 0;
159 163
164 // Returns true if we're logged in as a regular user.
165 virtual bool IsLoggedInAsRegularUser() const = 0;
bartfab (slow) 2012/12/03 10:39:21 This line was missing, causing a compile failure o
166
160 // Returns true if we're logged in as a demo user. 167 // Returns true if we're logged in as a demo user.
161 virtual bool IsLoggedInAsDemoUser() const = 0; 168 virtual bool IsLoggedInAsDemoUser() const = 0;
162 169
163 // Returns true if we're logged in as a public account. 170 // Returns true if we're logged in as a public account.
164 virtual bool IsLoggedInAsPublicAccount() const = 0; 171 virtual bool IsLoggedInAsPublicAccount() const = 0;
165 172
166 // Returns true if we're logged in as a Guest. 173 // Returns true if we're logged in as a Guest.
167 virtual bool IsLoggedInAsGuest() const = 0; 174 virtual bool IsLoggedInAsGuest() const = 0;
168 175
169 // Returns true if we're logged in as the stub user used for testing on Linux. 176 // Returns true if we're logged in as the stub user used for testing on Linux.
(...skipping 10 matching lines...) Expand all
180 187
181 virtual void AddObserver(Observer* obs) = 0; 188 virtual void AddObserver(Observer* obs) = 0;
182 virtual void RemoveObserver(Observer* obs) = 0; 189 virtual void RemoveObserver(Observer* obs) = 0;
183 190
184 virtual void NotifyLocalStateChanged() = 0; 191 virtual void NotifyLocalStateChanged() = 0;
185 }; 192 };
186 193
187 } // namespace chromeos 194 } // namespace chromeos
188 195
189 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ 196 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698