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

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

Issue 1262883003: Revert of Added affiliation IDs for the new affiliation determination. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 158
159 // True if current user is logged in. 159 // True if current user is logged in.
160 bool is_logged_in() const; 160 bool is_logged_in() const;
161 161
162 // True if current user is active within the current session. 162 // True if current user is active within the current session.
163 bool is_active() const; 163 bool is_active() const;
164 164
165 // True if the user Profile is created. 165 // True if the user Profile is created.
166 bool is_profile_created() const { return profile_is_created_; } 166 bool is_profile_created() const { return profile_is_created_; }
167 167
168 // True if the user is affiliated to the device.
169 bool is_affiliated() const { return is_affiliated_; }
170
171 protected: 168 protected:
172 friend class UserManagerBase; 169 friend class UserManagerBase;
173 friend class chromeos::ChromeUserManagerImpl; 170 friend class chromeos::ChromeUserManagerImpl;
174 friend class chromeos::SupervisedUserManagerImpl; 171 friend class chromeos::SupervisedUserManagerImpl;
175 friend class chromeos::UserImageManagerImpl; 172 friend class chromeos::UserImageManagerImpl;
176 friend class chromeos::UserSessionManager; 173 friend class chromeos::UserSessionManager;
177 174
178 // For testing: 175 // For testing:
179 friend class FakeUserManager; 176 friend class FakeUserManager;
180 friend class chromeos::FakeChromeUserManager; 177 friend class chromeos::FakeChromeUserManager;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 236
240 void set_can_lock(bool can_lock) { can_lock_ = can_lock; } 237 void set_can_lock(bool can_lock) { can_lock_ = can_lock; }
241 238
242 void set_is_active(bool is_active) { is_active_ = is_active; } 239 void set_is_active(bool is_active) { is_active_ = is_active; }
243 240
244 void set_profile_is_created() { profile_is_created_ = true; } 241 void set_profile_is_created() { profile_is_created_ = true; }
245 242
246 // True if user has google account (not a guest or managed user). 243 // True if user has google account (not a guest or managed user).
247 bool has_gaia_account() const; 244 bool has_gaia_account() const;
248 245
249 void set_affiliation(bool is_affiliated) {
250 is_affiliated_ = is_affiliated;
251 }
252
253 private: 246 private:
254 std::string email_; 247 std::string email_;
255 base::string16 display_name_; 248 base::string16 display_name_;
256 base::string16 given_name_; 249 base::string16 given_name_;
257 // The displayed user email, defaults to |email_|. 250 // The displayed user email, defaults to |email_|.
258 std::string display_email_; 251 std::string display_email_;
259 bool using_saml_; 252 bool using_saml_;
260 UserImage user_image_; 253 UserImage user_image_;
261 OAuthTokenStatus oauth_token_status_; 254 OAuthTokenStatus oauth_token_status_;
262 bool force_online_signin_; 255 bool force_online_signin_;
(...skipping 22 matching lines...) Expand all
285 278
286 // True if user is currently logged in in current session. 279 // True if user is currently logged in in current session.
287 bool is_logged_in_; 280 bool is_logged_in_;
288 281
289 // True if user is currently logged in and active in current session. 282 // True if user is currently logged in and active in current session.
290 bool is_active_; 283 bool is_active_;
291 284
292 // True if user Profile is created 285 // True if user Profile is created
293 bool profile_is_created_; 286 bool profile_is_created_;
294 287
295 // True if the user is affiliated to the device.
296 bool is_affiliated_;
297
298 DISALLOW_COPY_AND_ASSIGN(User); 288 DISALLOW_COPY_AND_ASSIGN(User);
299 }; 289 };
300 290
301 // List of known users. 291 // List of known users.
302 typedef std::vector<User*> UserList; 292 typedef std::vector<User*> UserList;
303 293
304 } // namespace user_manager 294 } // namespace user_manager
305 295
306 #endif // COMPONENTS_USER_MANAGER_USER_H_ 296 #endif // COMPONENTS_USER_MANAGER_USER_H_
OLDNEW
« no previous file with comments | « components/policy/proto/device_management_backend.proto ('k') | components/user_manager/user.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698