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

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

Issue 69863006: Address races in UserImageManagerImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix WallpaperManager browser tests now that UserImageLoader contains a DCHECK(success). Created 7 years, 1 month 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 const std::string& user_id_hash, 68 const std::string& user_id_hash,
69 bool browser_restart) OVERRIDE; 69 bool browser_restart) OVERRIDE;
70 virtual void SwitchActiveUser(const std::string& user_id) OVERRIDE; 70 virtual void SwitchActiveUser(const std::string& user_id) OVERRIDE;
71 virtual void RestoreActiveSessions() OVERRIDE; 71 virtual void RestoreActiveSessions() OVERRIDE;
72 virtual void SessionStarted() OVERRIDE; 72 virtual void SessionStarted() OVERRIDE;
73 virtual void RemoveUser(const std::string& user_id, 73 virtual void RemoveUser(const std::string& user_id,
74 RemoveUserDelegate* delegate) OVERRIDE; 74 RemoveUserDelegate* delegate) OVERRIDE;
75 virtual void RemoveUserFromList(const std::string& user_id) OVERRIDE; 75 virtual void RemoveUserFromList(const std::string& user_id) OVERRIDE;
76 virtual bool IsKnownUser(const std::string& user_id) const OVERRIDE; 76 virtual bool IsKnownUser(const std::string& user_id) const OVERRIDE;
77 virtual const User* FindUser(const std::string& user_id) const OVERRIDE; 77 virtual const User* FindUser(const std::string& user_id) const OVERRIDE;
78 virtual User* FindUserAndModify(const std::string& user_id) OVERRIDE;
78 virtual const User* GetLoggedInUser() const OVERRIDE; 79 virtual const User* GetLoggedInUser() const OVERRIDE;
79 virtual User* GetLoggedInUser() OVERRIDE; 80 virtual User* GetLoggedInUser() OVERRIDE;
80 virtual const User* GetActiveUser() const OVERRIDE; 81 virtual const User* GetActiveUser() const OVERRIDE;
81 virtual User* GetActiveUser() OVERRIDE; 82 virtual User* GetActiveUser() OVERRIDE;
82 virtual const User* GetPrimaryUser() const OVERRIDE; 83 virtual const User* GetPrimaryUser() const OVERRIDE;
83 virtual User* GetUserByProfile(Profile* profile) const OVERRIDE; 84 virtual User* GetUserByProfile(Profile* profile) const OVERRIDE;
84 virtual void SaveUserOAuthStatus( 85 virtual void SaveUserOAuthStatus(
85 const std::string& user_id, 86 const std::string& user_id,
86 User::OAuthTokenStatus oauth_token_status) OVERRIDE; 87 User::OAuthTokenStatus oauth_token_status) OVERRIDE;
87 virtual void SaveUserDisplayName(const std::string& user_id, 88 virtual void SaveUserDisplayName(const std::string& user_id,
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 173
173 // Returns true if trusted device policies have successfully been retrieved 174 // Returns true if trusted device policies have successfully been retrieved
174 // and ephemeral users are enabled. 175 // and ephemeral users are enabled.
175 bool AreEphemeralUsersEnabled() const; 176 bool AreEphemeralUsersEnabled() const;
176 177
177 // Returns a list of users who have logged into this device previously. 178 // Returns a list of users who have logged into this device previously.
178 // Same as GetUsers but used if you need to modify User from that list. 179 // Same as GetUsers but used if you need to modify User from that list.
179 UserList& GetUsersAndModify(); 180 UserList& GetUsersAndModify();
180 181
181 // Returns the user with the given email address if found in the persistent 182 // Returns the user with the given email address if found in the persistent
182 // list or currently logged in as ephemeral. Returns |NULL| otherwise.
183 // Same as FindUser but returns non-const pointer to User object.
184 User* FindUserAndModify(const std::string& user_id);
185
186 // Returns the user with the given email address if found in the persistent
187 // list. Returns |NULL| otherwise. 183 // list. Returns |NULL| otherwise.
188 const User* FindUserInList(const std::string& user_id) const; 184 const User* FindUserInList(const std::string& user_id) const;
189 185
190 // Returns |true| if user with the given id is found in the persistent list. 186 // Returns |true| if user with the given id is found in the persistent list.
191 // Returns |false| otherwise. Does not trigger user loading. 187 // Returns |false| otherwise. Does not trigger user loading.
192 const bool UserExistsInList(const std::string& user_id) const; 188 const bool UserExistsInList(const std::string& user_id) const;
193 189
194 // Same as FindUserInList but returns non-const pointer to User object. 190 // Same as FindUserInList but returns non-const pointer to User object.
195 User* FindUserInListAndModify(const std::string& user_id); 191 User* FindUserInListAndModify(const std::string& user_id);
196 192
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 scoped_ptr<MultiProfileUserController> multi_profile_user_controller_; 445 scoped_ptr<MultiProfileUserController> multi_profile_user_controller_;
450 scoped_ptr<MultiProfileFirstRunNotification> 446 scoped_ptr<MultiProfileFirstRunNotification>
451 multi_profile_first_run_notification_; 447 multi_profile_first_run_notification_;
452 448
453 DISALLOW_COPY_AND_ASSIGN(UserManagerImpl); 449 DISALLOW_COPY_AND_ASSIGN(UserManagerImpl);
454 }; 450 };
455 451
456 } // namespace chromeos 452 } // namespace chromeos
457 453
458 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_ 454 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/user_manager.h ('k') | chrome/browser/chromeos/login/user_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698