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

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

Issue 14756019: Adding new user menu section to the SystemTrayMenu & refactoring of user access (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More windows breakages addressed Created 7 years, 7 months 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_IMPL_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 30 matching lines...) Expand all
41 public content::NotificationObserver, 41 public content::NotificationObserver,
42 public policy::DeviceLocalAccountPolicyService::Observer { 42 public policy::DeviceLocalAccountPolicyService::Observer {
43 public: 43 public:
44 virtual ~UserManagerImpl(); 44 virtual ~UserManagerImpl();
45 45
46 // UserManager implementation: 46 // UserManager implementation:
47 virtual void Shutdown() OVERRIDE; 47 virtual void Shutdown() OVERRIDE;
48 virtual UserImageManager* GetUserImageManager() OVERRIDE; 48 virtual UserImageManager* GetUserImageManager() OVERRIDE;
49 virtual const UserList& GetUsers() const OVERRIDE; 49 virtual const UserList& GetUsers() const OVERRIDE;
50 virtual const UserList& GetLoggedInUsers() const OVERRIDE; 50 virtual const UserList& GetLoggedInUsers() const OVERRIDE;
51 virtual const UserList& GetLRULoggedInUsers() OVERRIDE;
51 virtual void UserLoggedIn(const std::string& email, 52 virtual void UserLoggedIn(const std::string& email,
52 const std::string& username_hash, 53 const std::string& username_hash,
53 bool browser_restart) OVERRIDE; 54 bool browser_restart) OVERRIDE;
54 virtual void SwitchActiveUser(const std::string& email) OVERRIDE; 55 virtual void SwitchActiveUser(const std::string& email) OVERRIDE;
55 virtual void SessionStarted() OVERRIDE; 56 virtual void SessionStarted() OVERRIDE;
56 virtual void RemoveUser(const std::string& email, 57 virtual void RemoveUser(const std::string& email,
57 RemoveUserDelegate* delegate) OVERRIDE; 58 RemoveUserDelegate* delegate) OVERRIDE;
58 virtual void RemoveUserFromList(const std::string& email) OVERRIDE; 59 virtual void RemoveUserFromList(const std::string& email) OVERRIDE;
59 virtual bool IsKnownUser(const std::string& email) const OVERRIDE; 60 virtual bool IsKnownUser(const std::string& email) const OVERRIDE;
60 virtual const User* FindUser(const std::string& email) const OVERRIDE; 61 virtual const User* FindUser(const std::string& email) const OVERRIDE;
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 253
253 // Lazily creates default user flow. 254 // Lazily creates default user flow.
254 UserFlow* GetDefaultUserFlow() const; 255 UserFlow* GetDefaultUserFlow() const;
255 256
256 // Update the global LoginState. 257 // Update the global LoginState.
257 void UpdateLoginState(); 258 void UpdateLoginState();
258 259
259 // Gets the list of public accounts defined in device settings. 260 // Gets the list of public accounts defined in device settings.
260 void ReadPublicAccounts(base::ListValue* public_accounts); 261 void ReadPublicAccounts(base::ListValue* public_accounts);
261 262
263 // Insert |user| at the front of the LRU user list..
264 void SetLRUUser(User* user);
265
262 // Interface to the signed settings store. 266 // Interface to the signed settings store.
263 CrosSettings* cros_settings_; 267 CrosSettings* cros_settings_;
264 268
265 // Interface to device-local account definitions and associated policy. 269 // Interface to device-local account definitions and associated policy.
266 policy::DeviceLocalAccountPolicyService* device_local_account_policy_service_; 270 policy::DeviceLocalAccountPolicyService* device_local_account_policy_service_;
267 271
268 // True if users have been loaded from prefs already. 272 // True if users have been loaded from prefs already.
269 bool users_loaded_; 273 bool users_loaded_;
270 274
271 // List of all known users. User instances are owned by |this|. Regular users 275 // List of all known users. User instances are owned by |this|. Regular users
272 // are removed by |RemoveUserFromList|, public accounts by 276 // are removed by |RemoveUserFromList|, public accounts by
273 // |UpdateAndCleanUpPublicAccounts|. 277 // |UpdateAndCleanUpPublicAccounts|.
274 UserList users_; 278 UserList users_;
275 279
276 // List of all users that are logged in current session. These point to User 280 // List of all users that are logged in current session. These point to User
277 // instances in |users_|. Only one of them could be marked as active. 281 // instances in |users_|. Only one of them could be marked as active.
278 UserList logged_in_users_; 282 UserList logged_in_users_;
279 283
284 // A list of all users that are logged in the current session. In contrast to
285 // |logged_in_users|, the order of this list is least recently used so that
286 // the active user should always be the first one in the list.
287 UserList lru_logged_in_users_;
288
289 // The list which gets reported when the |lru_logged_in_users_| list is empty.
290 UserList temp_single_logged_in_users_;
291
280 // The logged-in user that is currently active in current session. 292 // The logged-in user that is currently active in current session.
281 // NULL until a user has logged in, then points to one 293 // NULL until a user has logged in, then points to one
282 // of the User instances in |users_|, the |guest_user_| instance or an 294 // of the User instances in |users_|, the |guest_user_| instance or an
283 // ephemeral user instance. 295 // ephemeral user instance.
284 User* active_user_; 296 User* active_user_;
285 297
286 // True if SessionStarted() has been called. 298 // True if SessionStarted() has been called.
287 bool session_started_; 299 bool session_started_;
288 300
289 // Cached flag of whether currently logged-in user is owner or not. 301 // Cached flag of whether currently logged-in user is owner or not.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 356
345 // Specific flows by user e-mail. 357 // Specific flows by user e-mail.
346 FlowMap specific_flows_; 358 FlowMap specific_flows_;
347 359
348 DISALLOW_COPY_AND_ASSIGN(UserManagerImpl); 360 DISALLOW_COPY_AND_ASSIGN(UserManagerImpl);
349 }; 361 };
350 362
351 } // namespace chromeos 363 } // namespace chromeos
352 364
353 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_ 365 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698