| 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_H_ | 5 #ifndef COMPONENTS_USER_MANAGER_USER_H_ |
| 6 #define COMPONENTS_USER_MANAGER_USER_H_ | 6 #define COMPONENTS_USER_MANAGER_USER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 // The displayed user name. | 87 // The displayed user name. |
| 88 base::string16 display_name() const { return display_name_; } | 88 base::string16 display_name() const { return display_name_; } |
| 89 | 89 |
| 90 // UserInfo | 90 // UserInfo |
| 91 std::string GetEmail() const override; | 91 std::string GetEmail() const override; |
| 92 base::string16 GetDisplayName() const override; | 92 base::string16 GetDisplayName() const override; |
| 93 base::string16 GetGivenName() const override; | 93 base::string16 GetGivenName() const override; |
| 94 const gfx::ImageSkia& GetImage() const override; | 94 const gfx::ImageSkia& GetImage() const override; |
| 95 std::string GetUserID() const override; | 95 std::string GetUserID() const override; |
| 96 | 96 |
| 97 // Allows managing supervised status of the user. Used for RegularUser. | 97 // Allows managing child status of the user. Used for RegularUser. |
| 98 virtual void SetIsSupervised(bool is_supervised); | 98 virtual void SetIsChild(bool is_child); |
| 99 | 99 |
| 100 // Returns true if user has gaia account. True for users of types | 100 // Returns true if user has gaia account. True for users of types |
| 101 // USER_TYPE_REGULAR and USER_TYPE_REGULAR_SUPERVISED. | 101 // USER_TYPE_REGULAR and USER_TYPE_CHILD. |
| 102 virtual bool HasGaiaAccount() const; | 102 virtual bool HasGaiaAccount() const; |
| 103 | 103 |
| 104 // Returns true if user is supervised. | 104 // Returns true if user is supervised. |
| 105 virtual bool IsSupervised() const; | 105 virtual bool IsSupervised() const; |
| 106 | 106 |
| 107 // Returns the account name part of the email. Use the display form of the | 107 // Returns the account name part of the email. Use the display form of the |
| 108 // email if available and use_display_name == true. Otherwise use canonical. | 108 // email if available and use_display_name == true. Otherwise use canonical. |
| 109 std::string GetAccountName(bool use_display_email) const; | 109 std::string GetAccountName(bool use_display_email) const; |
| 110 | 110 |
| 111 // Whether the user has a default image. | 111 // Whether the user has a default image. |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 | 281 |
| 282 DISALLOW_COPY_AND_ASSIGN(User); | 282 DISALLOW_COPY_AND_ASSIGN(User); |
| 283 }; | 283 }; |
| 284 | 284 |
| 285 // List of known users. | 285 // List of known users. |
| 286 typedef std::vector<User*> UserList; | 286 typedef std::vector<User*> UserList; |
| 287 | 287 |
| 288 } // namespace user_manager | 288 } // namespace user_manager |
| 289 | 289 |
| 290 #endif // COMPONENTS_USER_MANAGER_USER_H_ | 290 #endif // COMPONENTS_USER_MANAGER_USER_H_ |
| OLD | NEW |