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

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

Issue 444903002: [cros] user_manager component - move UserManagerBase and UserManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « components/user_manager/remove_user_delegate.h ('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 ChromeUserManager; 21 class ChromeUserManagerImpl;
22 class FakeLoginUtils; 22 class FakeLoginUtils;
23 class FakeUserManager; 23 class FakeUserManager;
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 UserManagerBase;
29 class UserSessionManager; 28 class UserSessionManager;
30 } 29 }
31 30
32 namespace user_manager { 31 namespace user_manager {
33 32
33 class UserManagerBase;
34
34 // A class representing information about a previously logged in user. 35 // A class representing information about a previously logged in user.
35 // Each user has a canonical email (username), returned by |email()| and 36 // Each user has a canonical email (username), returned by |email()| and
36 // may have a different displayed email (in the raw form as entered by user), 37 // may have a different displayed email (in the raw form as entered by user),
37 // returned by |displayed_email()|. 38 // returned by |displayed_email()|.
38 // Displayed emails are for use in UI only, anywhere else users must be referred 39 // Displayed emails are for use in UI only, anywhere else users must be referred
39 // to by |email()|. 40 // to by |email()|.
40 class USER_MANAGER_EXPORT User : public UserInfo { 41 class USER_MANAGER_EXPORT User : public UserInfo {
41 public: 42 public:
42 // User OAuth token status according to the last check. 43 // User OAuth token status according to the last check.
43 // Please note that enum values 1 and 2 were used for OAuth1 status and are 44 // Please note that enum values 1 and 2 were used for OAuth1 status and are
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 // True if current user is logged in. 142 // True if current user is logged in.
142 bool is_logged_in() const; 143 bool is_logged_in() const;
143 144
144 // True if current user is active within the current session. 145 // True if current user is active within the current session.
145 bool is_active() const; 146 bool is_active() const;
146 147
147 // True if the user Profile is created. 148 // True if the user Profile is created.
148 bool is_profile_created() const { return profile_is_created_; } 149 bool is_profile_created() const { return profile_is_created_; }
149 150
150 protected: 151 protected:
151 friend class chromeos::ChromeUserManager; 152 friend class UserManagerBase;
153 friend class chromeos::ChromeUserManagerImpl;
152 friend class chromeos::SupervisedUserManagerImpl; 154 friend class chromeos::SupervisedUserManagerImpl;
153 friend class chromeos::UserImageManagerImpl; 155 friend class chromeos::UserImageManagerImpl;
154 friend class chromeos::UserManagerBase;
155 friend class chromeos::UserSessionManager; 156 friend class chromeos::UserSessionManager;
156 157
157 // For testing: 158 // For testing:
158 friend class chromeos::MockUserManager; 159 friend class chromeos::MockUserManager;
159 friend class chromeos::FakeLoginUtils; 160 friend class chromeos::FakeLoginUtils;
160 friend class chromeos::FakeUserManager; 161 friend class chromeos::FakeUserManager;
161 friend class chromeos::UserAddingScreenTest; 162 friend class chromeos::UserAddingScreenTest;
162 163
163 // Do not allow anyone else to create new User instances. 164 // Do not allow anyone else to create new User instances.
164 static User* CreateRegularUser(const std::string& email); 165 static User* CreateRegularUser(const std::string& email);
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 268
268 DISALLOW_COPY_AND_ASSIGN(User); 269 DISALLOW_COPY_AND_ASSIGN(User);
269 }; 270 };
270 271
271 // List of known users. 272 // List of known users.
272 typedef std::vector<User*> UserList; 273 typedef std::vector<User*> UserList;
273 274
274 } // namespace user_manager 275 } // namespace user_manager
275 276
276 #endif // COMPONENTS_USER_MANAGER_USER_H_ 277 #endif // COMPONENTS_USER_MANAGER_USER_H_
OLDNEW
« no previous file with comments | « components/user_manager/remove_user_delegate.h ('k') | components/user_manager/user_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698