Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: components/user_manager/user.h

Issue 824683002: UserManager stack refactoring. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test fixed. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/user_manager/fake_user_manager.cc ('k') | components/user_manager/user_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 ChromeUserManagerImpl; 21 class ChromeUserManagerImpl;
22 class FakeLoginUtils; 22 class FakeLoginUtils;
23 class FakeUserManager; 23 class FakeChromeUserManager;
24 class MockUserManager; 24 class MockUserManager;
25 class SupervisedUserManagerImpl; 25 class SupervisedUserManagerImpl;
26 class UserAddingScreenTest; 26 class UserAddingScreenTest;
27 class UserImageManagerImpl; 27 class UserImageManagerImpl;
28 class UserSessionManager; 28 class UserSessionManager;
29 } 29 }
30 30
31 namespace user_manager { 31 namespace user_manager {
32 32
33 class UserManagerBase; 33 class UserManagerBase;
34 class FakeUserManager;
34 35
35 // A class representing information about a previously logged in user. 36 // A class representing information about a previously logged in user.
36 // Each user has a canonical email (username), returned by |email()| and 37 // Each user has a canonical email (username), returned by |email()| and
37 // may have a different displayed email (in the raw form as entered by user), 38 // may have a different displayed email (in the raw form as entered by user),
38 // returned by |displayed_email()|. 39 // returned by |displayed_email()|.
39 // Displayed emails are for use in UI only, anywhere else users must be referred 40 // Displayed emails are for use in UI only, anywhere else users must be referred
40 // to by |email()|. 41 // to by |email()|.
41 class USER_MANAGER_EXPORT User : public UserInfo { 42 class USER_MANAGER_EXPORT User : public UserInfo {
42 public: 43 public:
43 // User OAuth token status according to the last check. 44 // User OAuth token status according to the last check.
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 bool is_profile_created() const { return profile_is_created_; } 163 bool is_profile_created() const { return profile_is_created_; }
163 164
164 protected: 165 protected:
165 friend class UserManagerBase; 166 friend class UserManagerBase;
166 friend class chromeos::ChromeUserManagerImpl; 167 friend class chromeos::ChromeUserManagerImpl;
167 friend class chromeos::SupervisedUserManagerImpl; 168 friend class chromeos::SupervisedUserManagerImpl;
168 friend class chromeos::UserImageManagerImpl; 169 friend class chromeos::UserImageManagerImpl;
169 friend class chromeos::UserSessionManager; 170 friend class chromeos::UserSessionManager;
170 171
171 // For testing: 172 // For testing:
173 friend class FakeUserManager;
174 friend class chromeos::FakeChromeUserManager;
172 friend class chromeos::MockUserManager; 175 friend class chromeos::MockUserManager;
173 friend class chromeos::FakeLoginUtils; 176 friend class chromeos::FakeLoginUtils;
174 friend class chromeos::FakeUserManager;
175 friend class chromeos::UserAddingScreenTest; 177 friend class chromeos::UserAddingScreenTest;
176 178
177 // Do not allow anyone else to create new User instances. 179 // Do not allow anyone else to create new User instances.
178 static User* CreateRegularUser(const std::string& email); 180 static User* CreateRegularUser(const std::string& email);
179 static User* CreateGuestUser(); 181 static User* CreateGuestUser();
180 static User* CreateKioskAppUser(const std::string& kiosk_app_username); 182 static User* CreateKioskAppUser(const std::string& kiosk_app_username);
181 static User* CreateSupervisedUser(const std::string& username); 183 static User* CreateSupervisedUser(const std::string& username);
182 static User* CreatePublicAccountUser(const std::string& email); 184 static User* CreatePublicAccountUser(const std::string& email);
183 185
184 explicit User(const std::string& email); 186 explicit User(const std::string& email);
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 282
281 DISALLOW_COPY_AND_ASSIGN(User); 283 DISALLOW_COPY_AND_ASSIGN(User);
282 }; 284 };
283 285
284 // List of known users. 286 // List of known users.
285 typedef std::vector<User*> UserList; 287 typedef std::vector<User*> UserList;
286 288
287 } // namespace user_manager 289 } // namespace user_manager
288 290
289 #endif // COMPONENTS_USER_MANAGER_USER_H_ 291 #endif // COMPONENTS_USER_MANAGER_USER_H_
OLDNEW
« no previous file with comments | « components/user_manager/fake_user_manager.cc ('k') | components/user_manager/user_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698