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

Unified Diff: components/user_manager/user.h

Issue 2711113003: Track whether a given user session has completed initialization, and use (Closed)
Patch Set: Only expose known_user::RemovePrefsForTesting() for tests Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/user_manager/known_user.cc ('k') | components/user_manager/user_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/user_manager/user.h
diff --git a/components/user_manager/user.h b/components/user_manager/user.h
index 26c52599632fc3fb947fc871061827ebb6a92a46..fecc33bec1de68c1e48974050722d78b045c7899 100644
--- a/components/user_manager/user.h
+++ b/components/user_manager/user.h
@@ -171,6 +171,9 @@ class USER_MANAGER_EXPORT User : public UserInfo {
// user's next sign-in.
bool force_online_signin() const { return force_online_signin_; }
+ // Whether the user's session has completed initialization yet.
+ bool profile_ever_initialized() const { return profile_ever_initialized_; }
+
// True if the user's session can be locked (i.e. the user has a password with
// which to unlock the session).
bool can_lock() const;
@@ -200,6 +203,7 @@ class USER_MANAGER_EXPORT User : public UserInfo {
friend class chromeos::MockUserManager;
friend class chromeos::UserAddingScreenTest;
FRIEND_TEST_ALL_PREFIXES(UserTest, DeviceLocalAccountAffiliation);
+ FRIEND_TEST_ALL_PREFIXES(UserTest, UserSessionInitialized);
// Do not allow anyone else to create new User instances.
static User* CreateRegularUser(const AccountId& account_id);
@@ -249,6 +253,10 @@ class USER_MANAGER_EXPORT User : public UserInfo {
force_online_signin_ = force_online_signin;
}
+ void set_profile_ever_initialized(bool profile_ever_initialized) {
+ profile_ever_initialized_ = profile_ever_initialized;
+ }
+
void set_username_hash(const std::string& username_hash) {
username_hash_ = username_hash;
}
@@ -276,6 +284,7 @@ class USER_MANAGER_EXPORT User : public UserInfo {
std::unique_ptr<UserImage> user_image_;
OAuthTokenStatus oauth_token_status_ = OAUTH_TOKEN_STATUS_UNKNOWN;
bool force_online_signin_ = false;
+ bool profile_ever_initialized_ = false;
// This is set to chromeos locale if account data has been downloaded.
// (Or failed to download, but at least one download attempt finished).
« no previous file with comments | « components/user_manager/known_user.cc ('k') | components/user_manager/user_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698