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

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

Issue 63173012: SupervisedUsers : Fix transaction cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added test 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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 178
179 // Returns the user with the given email address if found in the persistent 179 // Returns the user with the given email address if found in the persistent
180 // list or currently logged in as ephemeral. Returns |NULL| otherwise. 180 // list or currently logged in as ephemeral. Returns |NULL| otherwise.
181 // Same as FindUser but returns non-const pointer to User object. 181 // Same as FindUser but returns non-const pointer to User object.
182 User* FindUserAndModify(const std::string& user_id); 182 User* FindUserAndModify(const std::string& user_id);
183 183
184 // Returns the user with the given email address if found in the persistent 184 // Returns the user with the given email address if found in the persistent
185 // list. Returns |NULL| otherwise. 185 // list. Returns |NULL| otherwise.
186 const User* FindUserInList(const std::string& user_id) const; 186 const User* FindUserInList(const std::string& user_id) const;
187 187
188 // Returns |true| if user with the given id is found in the persistent list.
189 // Returns |false| otherwise. Does not trigger user loading.
190 const bool UserExistsInList(const std::string& user_id) const;
191
188 // Same as FindUserInList but returns non-const pointer to User object. 192 // Same as FindUserInList but returns non-const pointer to User object.
189 User* FindUserInListAndModify(const std::string& user_id); 193 User* FindUserInListAndModify(const std::string& user_id);
190 194
191 // Indicates that a user just logged in as guest. 195 // Indicates that a user just logged in as guest.
192 void GuestUserLoggedIn(); 196 void GuestUserLoggedIn();
193 197
194 // Indicates that a regular user just logged in. 198 // Indicates that a regular user just logged in.
195 void RegularUserLoggedIn(const std::string& user_id); 199 void RegularUserLoggedIn(const std::string& user_id);
196 200
197 // Indicates that a regular user just logged in as ephemeral. 201 // Indicates that a regular user just logged in as ephemeral.
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 const std::string& user_id, 313 const std::string& user_id,
310 const string16& display_name, 314 const string16& display_name,
311 const std::string* resolved_account_locale); 315 const std::string* resolved_account_locale);
312 316
313 // Decorator to the previous function. 317 // Decorator to the previous function.
314 void UpdateUserAccountDataImplCallbackDecorator( 318 void UpdateUserAccountDataImplCallbackDecorator(
315 const scoped_ptr<UpdateUserAccountDataCallbackData>& data); 319 const scoped_ptr<UpdateUserAccountDataCallbackData>& data);
316 320
317 Profile* GetProfileByUser(const User* user) const; 321 Profile* GetProfileByUser(const User* user) const;
318 322
323 // Implementation for RemoveUser method. This is an asynchronous part of the
324 // method, that verifies that owner will not get deleted.
325 void RemoveUserInternal(const std::string& user_email,
326 RemoveUserDelegate* delegate);
327
328 // Implementation for RemoveUser method. This is a synchronous part of the
329 // method.
330 void RemoveNonOwnerUserInternal(const std::string& user_email,
331 RemoveUserDelegate* delegate);
332
319 // MultiProfileUserControllerDelegate implementation: 333 // MultiProfileUserControllerDelegate implementation:
320 virtual void OnUserNotAllowed() OVERRIDE; 334 virtual void OnUserNotAllowed() OVERRIDE;
321 335
322 // Interface to the signed settings store. 336 // Interface to the signed settings store.
323 CrosSettings* cros_settings_; 337 CrosSettings* cros_settings_;
324 338
325 // Interface to device-local account definitions and associated policy. 339 // Interface to device-local account definitions and associated policy.
326 policy::DeviceLocalAccountPolicyService* device_local_account_policy_service_; 340 policy::DeviceLocalAccountPolicyService* device_local_account_policy_service_;
327 341
328 // True if users have been loaded from prefs already. 342 // True if users have been loaded from prefs already.
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 scoped_ptr<MultiProfileUserController> multi_profile_user_controller_; 446 scoped_ptr<MultiProfileUserController> multi_profile_user_controller_;
433 scoped_ptr<MultiProfileFirstRunNotification> 447 scoped_ptr<MultiProfileFirstRunNotification>
434 multi_profile_first_run_notification_; 448 multi_profile_first_run_notification_;
435 449
436 DISALLOW_COPY_AND_ASSIGN(UserManagerImpl); 450 DISALLOW_COPY_AND_ASSIGN(UserManagerImpl);
437 }; 451 };
438 452
439 } // namespace chromeos 453 } // namespace chromeos
440 454
441 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_ 455 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698