OLD | NEW |
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_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 // The displayed user name. | 120 // The displayed user name. |
121 string16 display_name() const { return display_name_; } | 121 string16 display_name() const { return display_name_; } |
122 | 122 |
123 // The displayed (non-canonical) user email. | 123 // The displayed (non-canonical) user email. |
124 std::string display_email() const { return display_email_; } | 124 std::string display_email() const { return display_email_; } |
125 | 125 |
126 // True if the user's session can be locked (i.e. the user has a password with | 126 // True if the user's session can be locked (i.e. the user has a password with |
127 // which to unlock the session). | 127 // which to unlock the session). |
128 virtual bool can_lock() const; | 128 virtual bool can_lock() const; |
129 | 129 |
| 130 // True if the user's account is tied to this specific device (i.e. the user |
| 131 // does not authenticate against a cloud service). |
| 132 virtual bool is_device_local_account() const; |
| 133 |
| 134 // True if the user's account is built in and cannot be removed (e.g. guest |
| 135 // mode user). |
| 136 virtual bool is_builtin_account() const; |
| 137 |
130 protected: | 138 protected: |
131 friend class UserManagerImpl; | 139 friend class UserManagerImpl; |
132 friend class UserImageManagerImpl; | 140 friend class UserImageManagerImpl; |
133 // For testing: | 141 // For testing: |
134 friend class MockUserManager; | 142 friend class MockUserManager; |
135 | 143 |
136 // Do not allow anyone else to create new User instances. | 144 // Do not allow anyone else to create new User instances. |
137 static User* CreateRegularUser(const std::string& email); | 145 static User* CreateRegularUser(const std::string& email); |
138 static User* CreateGuestUser(); | 146 static User* CreateGuestUser(); |
139 static User* CreateRetailModeUser(); | 147 static User* CreateRetailModeUser(); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 | 194 |
187 DISALLOW_COPY_AND_ASSIGN(User); | 195 DISALLOW_COPY_AND_ASSIGN(User); |
188 }; | 196 }; |
189 | 197 |
190 // List of known users. | 198 // List of known users. |
191 typedef std::vector<User*> UserList; | 199 typedef std::vector<User*> UserList; |
192 | 200 |
193 } // namespace chromeos | 201 } // namespace chromeos |
194 | 202 |
195 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_H_ | 203 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_H_ |
OLD | NEW |