| 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_MANAGER_H_ | 5 #ifndef COMPONENTS_USER_MANAGER_USER_MANAGER_H_ |
| 6 #define COMPONENTS_USER_MANAGER_USER_MANAGER_H_ | 6 #define COMPONENTS_USER_MANAGER_USER_MANAGER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 virtual bool IsCurrentUserOwner() const = 0; | 262 virtual bool IsCurrentUserOwner() const = 0; |
| 263 | 263 |
| 264 // Returns true if current user is not existing one (hasn't signed in before). | 264 // Returns true if current user is not existing one (hasn't signed in before). |
| 265 virtual bool IsCurrentUserNew() const = 0; | 265 virtual bool IsCurrentUserNew() const = 0; |
| 266 | 266 |
| 267 // Returns true if data stored or cached for the current user outside that | 267 // Returns true if data stored or cached for the current user outside that |
| 268 // user's cryptohome (wallpaper, avatar, OAuth token status, display name, | 268 // user's cryptohome (wallpaper, avatar, OAuth token status, display name, |
| 269 // display email) is ephemeral. | 269 // display email) is ephemeral. |
| 270 virtual bool IsCurrentUserNonCryptohomeDataEphemeral() const = 0; | 270 virtual bool IsCurrentUserNonCryptohomeDataEphemeral() const = 0; |
| 271 | 271 |
| 272 // Returns true if data stored or cached for the current user inside that |
| 273 // user's cryptohome is ephemeral. |
| 274 virtual bool IsCurrentUserCryptohomeDataEphemeral() const = 0; |
| 275 |
| 272 // Returns true if the current user's session can be locked (i.e. the user has | 276 // Returns true if the current user's session can be locked (i.e. the user has |
| 273 // a password with which to unlock the session). | 277 // a password with which to unlock the session). |
| 274 virtual bool CanCurrentUserLock() const = 0; | 278 virtual bool CanCurrentUserLock() const = 0; |
| 275 | 279 |
| 276 // Returns true if at least one user has signed in. | 280 // Returns true if at least one user has signed in. |
| 277 virtual bool IsUserLoggedIn() const = 0; | 281 virtual bool IsUserLoggedIn() const = 0; |
| 278 | 282 |
| 279 // Returns true if we're logged in as a user with gaia account. | 283 // Returns true if we're logged in as a user with gaia account. |
| 280 virtual bool IsLoggedInAsUserWithGaiaAccount() const = 0; | 284 virtual bool IsLoggedInAsUserWithGaiaAccount() const = 0; |
| 281 | 285 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 302 // or restart after crash. | 306 // or restart after crash. |
| 303 virtual bool IsSessionStarted() const = 0; | 307 virtual bool IsSessionStarted() const = 0; |
| 304 | 308 |
| 305 // Returns true if data stored or cached for the user with the given | 309 // Returns true if data stored or cached for the user with the given |
| 306 // |account_id| | 310 // |account_id| |
| 307 // address outside that user's cryptohome (wallpaper, avatar, OAuth token | 311 // address outside that user's cryptohome (wallpaper, avatar, OAuth token |
| 308 // status, display name, display email) is to be treated as ephemeral. | 312 // status, display name, display email) is to be treated as ephemeral. |
| 309 virtual bool IsUserNonCryptohomeDataEphemeral( | 313 virtual bool IsUserNonCryptohomeDataEphemeral( |
| 310 const AccountId& account_id) const = 0; | 314 const AccountId& account_id) const = 0; |
| 311 | 315 |
| 316 virtual bool IsUserCryptohomeDataEphemeral( |
| 317 const AccountId& account_id) const = 0; |
| 318 |
| 312 virtual void AddObserver(Observer* obs) = 0; | 319 virtual void AddObserver(Observer* obs) = 0; |
| 313 virtual void RemoveObserver(Observer* obs) = 0; | 320 virtual void RemoveObserver(Observer* obs) = 0; |
| 314 | 321 |
| 315 virtual void AddSessionStateObserver(UserSessionStateObserver* obs) = 0; | 322 virtual void AddSessionStateObserver(UserSessionStateObserver* obs) = 0; |
| 316 virtual void RemoveSessionStateObserver(UserSessionStateObserver* obs) = 0; | 323 virtual void RemoveSessionStateObserver(UserSessionStateObserver* obs) = 0; |
| 317 | 324 |
| 318 virtual void NotifyLocalStateChanged() = 0; | 325 virtual void NotifyLocalStateChanged() = 0; |
| 319 | 326 |
| 320 // Changes the child status and notifies observers. | 327 // Changes the child status and notifies observers. |
| 321 virtual void ChangeUserChildStatus(User* user, bool is_child) = 0; | 328 virtual void ChangeUserChildStatus(User* user, bool is_child) = 0; |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 static UserManager* GetForTesting(); | 397 static UserManager* GetForTesting(); |
| 391 | 398 |
| 392 // Sets UserManager instance to the given |user_manager|. | 399 // Sets UserManager instance to the given |user_manager|. |
| 393 // Returns the previous value of the instance. | 400 // Returns the previous value of the instance. |
| 394 static UserManager* SetForTesting(UserManager* user_manager); | 401 static UserManager* SetForTesting(UserManager* user_manager); |
| 395 }; | 402 }; |
| 396 | 403 |
| 397 } // namespace user_manager | 404 } // namespace user_manager |
| 398 | 405 |
| 399 #endif // COMPONENTS_USER_MANAGER_USER_MANAGER_H_ | 406 #endif // COMPONENTS_USER_MANAGER_USER_MANAGER_H_ |
| OLD | NEW |