OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_USER_MANAGER_USER_MANAGER_BASE_H_ | 5 #ifndef COMPONENTS_USER_MANAGER_USER_MANAGER_BASE_H_ |
6 #define COMPONENTS_USER_MANAGER_USER_MANAGER_BASE_H_ | 6 #define COMPONENTS_USER_MANAGER_USER_MANAGER_BASE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 // Should be called when regular user was removed. | 279 // Should be called when regular user was removed. |
280 virtual void OnUserRemoved(const std::string& user_id) = 0; | 280 virtual void OnUserRemoved(const std::string& user_id) = 0; |
281 | 281 |
282 // Getters/setters for private members. | 282 // Getters/setters for private members. |
283 | 283 |
284 virtual void SetCurrentUserIsOwner(bool is_current_user_owner); | 284 virtual void SetCurrentUserIsOwner(bool is_current_user_owner); |
285 | 285 |
286 virtual bool GetEphemeralUsersEnabled() const; | 286 virtual bool GetEphemeralUsersEnabled() const; |
287 virtual void SetEphemeralUsersEnabled(bool enabled); | 287 virtual void SetEphemeralUsersEnabled(bool enabled); |
288 | 288 |
289 virtual void SetOwnerEmail(std::string owner_user_id); | 289 virtual void SetOwnerEmail(const std::string& owner_user_id); |
290 | 290 |
291 virtual const std::string& GetPendingUserSwitchID() const; | 291 virtual const std::string& GetPendingUserSwitchID() const; |
292 virtual void SetPendingUserSwitchID(std::string user_id); | 292 virtual void SetPendingUserSwitchID(const std::string& user_id); |
293 | 293 |
294 // The logged-in user that is currently active in current session. | 294 // The logged-in user that is currently active in current session. |
295 // NULL until a user has logged in, then points to one | 295 // NULL until a user has logged in, then points to one |
296 // of the User instances in |users_|, the |guest_user_| instance or an | 296 // of the User instances in |users_|, the |guest_user_| instance or an |
297 // ephemeral user instance. | 297 // ephemeral user instance. |
298 User* active_user_; | 298 User* active_user_; |
299 | 299 |
300 // The primary user of the current session. It is recorded for the first | 300 // The primary user of the current session. It is recorded for the first |
301 // signed-in user and does not change thereafter. | 301 // signed-in user and does not change thereafter. |
302 User* primary_user_; | 302 User* primary_user_; |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 scoped_refptr<base::TaskRunner> blocking_task_runner_; | 428 scoped_refptr<base::TaskRunner> blocking_task_runner_; |
429 | 429 |
430 base::WeakPtrFactory<UserManagerBase> weak_factory_; | 430 base::WeakPtrFactory<UserManagerBase> weak_factory_; |
431 | 431 |
432 DISALLOW_COPY_AND_ASSIGN(UserManagerBase); | 432 DISALLOW_COPY_AND_ASSIGN(UserManagerBase); |
433 }; | 433 }; |
434 | 434 |
435 } // namespace user_manager | 435 } // namespace user_manager |
436 | 436 |
437 #endif // COMPONENTS_USER_MANAGER_USER_MANAGER_BASE_H_ | 437 #endif // COMPONENTS_USER_MANAGER_USER_MANAGER_BASE_H_ |
OLD | NEW |