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 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
13 #include "components/user_manager/user_image/user_image.h" | 13 #include "components/user_manager/user_image/user_image.h" |
14 #include "components/user_manager/user_info.h" | 14 #include "components/user_manager/user_info.h" |
15 #include "components/user_manager/user_manager_export.h" | 15 #include "components/user_manager/user_manager_export.h" |
16 #include "components/user_manager/user_type.h" | 16 #include "components/user_manager/user_type.h" |
17 #include "third_party/skia/include/core/SkBitmap.h" | 17 #include "third_party/skia/include/core/SkBitmap.h" |
18 #include "ui/gfx/image/image_skia.h" | 18 #include "ui/gfx/image/image_skia.h" |
19 | 19 |
20 namespace chromeos { | 20 namespace chromeos { |
| 21 class ChromeUserManager; |
21 class FakeLoginUtils; | 22 class FakeLoginUtils; |
22 class FakeUserManager; | 23 class FakeUserManager; |
23 class MockUserManager; | 24 class MockUserManager; |
24 class SupervisedUserManagerImpl; | 25 class SupervisedUserManagerImpl; |
25 class UserAddingScreenTest; | 26 class UserAddingScreenTest; |
26 class UserImageManagerImpl; | 27 class UserImageManagerImpl; |
27 class UserManagerImpl; | 28 class UserManagerBase; |
28 class UserSessionManager; | 29 class UserSessionManager; |
29 } | 30 } |
30 | 31 |
31 namespace user_manager { | 32 namespace user_manager { |
32 | 33 |
33 // A class representing information about a previously logged in user. | 34 // A class representing information about a previously logged in user. |
34 // Each user has a canonical email (username), returned by |email()| and | 35 // Each user has a canonical email (username), returned by |email()| and |
35 // may have a different displayed email (in the raw form as entered by user), | 36 // may have a different displayed email (in the raw form as entered by user), |
36 // returned by |displayed_email()|. | 37 // returned by |displayed_email()|. |
37 // Displayed emails are for use in UI only, anywhere else users must be referred | 38 // Displayed emails are for use in UI only, anywhere else users must be referred |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 // True if current user is logged in. | 137 // True if current user is logged in. |
137 bool is_logged_in() const; | 138 bool is_logged_in() const; |
138 | 139 |
139 // True if current user is active within the current session. | 140 // True if current user is active within the current session. |
140 bool is_active() const; | 141 bool is_active() const; |
141 | 142 |
142 // True if the user Profile is created. | 143 // True if the user Profile is created. |
143 bool is_profile_created() const { return profile_is_created_; } | 144 bool is_profile_created() const { return profile_is_created_; } |
144 | 145 |
145 protected: | 146 protected: |
| 147 friend class chromeos::ChromeUserManager; |
146 friend class chromeos::SupervisedUserManagerImpl; | 148 friend class chromeos::SupervisedUserManagerImpl; |
147 friend class chromeos::UserManagerImpl; | |
148 friend class chromeos::UserImageManagerImpl; | 149 friend class chromeos::UserImageManagerImpl; |
| 150 friend class chromeos::UserManagerBase; |
149 friend class chromeos::UserSessionManager; | 151 friend class chromeos::UserSessionManager; |
150 | 152 |
151 // For testing: | 153 // For testing: |
152 friend class chromeos::MockUserManager; | 154 friend class chromeos::MockUserManager; |
153 friend class chromeos::FakeLoginUtils; | 155 friend class chromeos::FakeLoginUtils; |
154 friend class chromeos::FakeUserManager; | 156 friend class chromeos::FakeUserManager; |
155 friend class chromeos::UserAddingScreenTest; | 157 friend class chromeos::UserAddingScreenTest; |
156 | 158 |
157 // Do not allow anyone else to create new User instances. | 159 // Do not allow anyone else to create new User instances. |
158 static User* CreateRegularUser(const std::string& email); | 160 static User* CreateRegularUser(const std::string& email); |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 | 263 |
262 DISALLOW_COPY_AND_ASSIGN(User); | 264 DISALLOW_COPY_AND_ASSIGN(User); |
263 }; | 265 }; |
264 | 266 |
265 // List of known users. | 267 // List of known users. |
266 typedef std::vector<User*> UserList; | 268 typedef std::vector<User*> UserList; |
267 | 269 |
268 } // namespace user_manager | 270 } // namespace user_manager |
269 | 271 |
270 #endif // COMPONENTS_USER_MANAGER_USER_H_ | 272 #endif // COMPONENTS_USER_MANAGER_USER_H_ |
OLD | NEW |