| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 // True if current user is logged in. | 141 // True if current user is logged in. |
| 141 virtual bool is_logged_in() const; | 142 virtual bool is_logged_in() const; |
| 142 | 143 |
| 143 // True if current user is active within the current session. | 144 // True if current user is active within the current session. |
| 144 virtual bool is_active() const; | 145 virtual bool is_active() const; |
| 145 | 146 |
| 146 // True if the user Profile is created. | 147 // True if the user Profile is created. |
| 147 bool is_profile_created() const { return profile_is_created_; } | 148 bool is_profile_created() const { return profile_is_created_; } |
| 148 | 149 |
| 149 protected: | 150 protected: |
| 151 friend class chromeos::ChromeUserManager; |
| 150 friend class chromeos::SupervisedUserManagerImpl; | 152 friend class chromeos::SupervisedUserManagerImpl; |
| 151 friend class chromeos::UserManagerImpl; | |
| 152 friend class chromeos::UserImageManagerImpl; | 153 friend class chromeos::UserImageManagerImpl; |
| 154 friend class chromeos::UserManagerBase; |
| 153 friend class chromeos::UserSessionManager; | 155 friend class chromeos::UserSessionManager; |
| 154 | 156 |
| 155 // For testing: | 157 // For testing: |
| 156 friend class chromeos::MockUserManager; | 158 friend class chromeos::MockUserManager; |
| 157 friend class chromeos::FakeLoginUtils; | 159 friend class chromeos::FakeLoginUtils; |
| 158 friend class chromeos::FakeUserManager; | 160 friend class chromeos::FakeUserManager; |
| 159 friend class chromeos::UserAddingScreenTest; | 161 friend class chromeos::UserAddingScreenTest; |
| 160 | 162 |
| 161 // Do not allow anyone else to create new User instances. | 163 // Do not allow anyone else to create new User instances. |
| 162 static User* CreateRegularUser(const std::string& email); | 164 static User* CreateRegularUser(const std::string& email); |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 | 267 |
| 266 DISALLOW_COPY_AND_ASSIGN(User); | 268 DISALLOW_COPY_AND_ASSIGN(User); |
| 267 }; | 269 }; |
| 268 | 270 |
| 269 // List of known users. | 271 // List of known users. |
| 270 typedef std::vector<User*> UserList; | 272 typedef std::vector<User*> UserList; |
| 271 | 273 |
| 272 } // namespace user_manager | 274 } // namespace user_manager |
| 273 | 275 |
| 274 #endif // COMPONENTS_USER_MANAGER_USER_H_ | 276 #endif // COMPONENTS_USER_MANAGER_USER_H_ |
| OLD | NEW |