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

Side by Side Diff: components/user_manager/user_manager_base.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 unified diff | Download patch
« no previous file with comments | « components/user_manager/user_manager.h ('k') | components/user_manager/user_manager_base.cc » ('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_MANAGER_BASE_H_ 5 #ifndef COMPONENTS_USER_MANAGER_USER_MANAGER_BASE_H_
6 #define COMPONENTS_USER_MANAGER_USER_MANAGER_BASE_H_ 6 #define COMPONENTS_USER_MANAGER_USER_MANAGER_BASE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <set> 10 #include <set>
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 const UserList& GetUsers() const override; 49 const UserList& GetUsers() const override;
50 const UserList& GetLoggedInUsers() const override; 50 const UserList& GetLoggedInUsers() const override;
51 const UserList& GetLRULoggedInUsers() const override; 51 const UserList& GetLRULoggedInUsers() const override;
52 const AccountId& GetOwnerAccountId() const override; 52 const AccountId& GetOwnerAccountId() const override;
53 void UserLoggedIn(const AccountId& account_id, 53 void UserLoggedIn(const AccountId& account_id,
54 const std::string& user_id_hash, 54 const std::string& user_id_hash,
55 bool browser_restart) override; 55 bool browser_restart) override;
56 void SwitchActiveUser(const AccountId& account_id) override; 56 void SwitchActiveUser(const AccountId& account_id) override;
57 void SwitchToLastActiveUser() override; 57 void SwitchToLastActiveUser() override;
58 void OnSessionStarted() override; 58 void OnSessionStarted() override;
59 void OnProfileInitialized(User* user) override;
59 void RemoveUser(const AccountId& account_id, 60 void RemoveUser(const AccountId& account_id,
60 RemoveUserDelegate* delegate) override; 61 RemoveUserDelegate* delegate) override;
61 void RemoveUserFromList(const AccountId& account_id) override; 62 void RemoveUserFromList(const AccountId& account_id) override;
62 bool IsKnownUser(const AccountId& account_id) const override; 63 bool IsKnownUser(const AccountId& account_id) const override;
63 const User* FindUser(const AccountId& account_id) const override; 64 const User* FindUser(const AccountId& account_id) const override;
64 User* FindUserAndModify(const AccountId& account_id) override; 65 User* FindUserAndModify(const AccountId& account_id) override;
65 const User* GetActiveUser() const override; 66 const User* GetActiveUser() const override;
66 User* GetActiveUser() override; 67 User* GetActiveUser() override;
67 const User* GetPrimaryUser() const override; 68 const User* GetPrimaryUser() const override;
68 void SaveUserOAuthStatus(const AccountId& account_id, 69 void SaveUserOAuthStatus(const AccountId& account_id,
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 // Same as FindUserInList but returns non-const pointer to User object. 305 // Same as FindUserInList but returns non-const pointer to User object.
305 User* FindUserInListAndModify(const AccountId& account_id); 306 User* FindUserInListAndModify(const AccountId& account_id);
306 307
307 // Reads user's oauth token status from local state preferences. 308 // Reads user's oauth token status from local state preferences.
308 User::OAuthTokenStatus LoadUserOAuthStatus(const AccountId& account_id) const; 309 User::OAuthTokenStatus LoadUserOAuthStatus(const AccountId& account_id) const;
309 310
310 // Read a flag indicating whether online authentication against GAIA should 311 // Read a flag indicating whether online authentication against GAIA should
311 // be enforced during the user's next sign-in from local state preferences. 312 // be enforced during the user's next sign-in from local state preferences.
312 bool LoadForceOnlineSignin(const AccountId& account_id) const; 313 bool LoadForceOnlineSignin(const AccountId& account_id) const;
313 314
315 // Read a flag indicating whether session initialization has completed at
316 // least once.
317 bool LoadSessionInitialized(const AccountId& account_id) const;
318
314 // Notifies observers that merge session state had changed. 319 // Notifies observers that merge session state had changed.
315 void NotifyMergeSessionStateChanged(); 320 void NotifyMergeSessionStateChanged();
316 321
317 // Notifies observers that active user has changed. 322 // Notifies observers that active user has changed.
318 void NotifyActiveUserChanged(const User* active_user); 323 void NotifyActiveUserChanged(const User* active_user);
319 324
320 // Notifies observers that active account_id hash has changed. 325 // Notifies observers that active account_id hash has changed.
321 void NotifyActiveUserHashChanged(const std::string& hash); 326 void NotifyActiveUserHashChanged(const std::string& hash);
322 327
323 // Call UpdateLoginState. 328 // Call UpdateLoginState.
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 scoped_refptr<base::TaskRunner> task_runner_; 393 scoped_refptr<base::TaskRunner> task_runner_;
389 394
390 base::WeakPtrFactory<UserManagerBase> weak_factory_; 395 base::WeakPtrFactory<UserManagerBase> weak_factory_;
391 396
392 DISALLOW_COPY_AND_ASSIGN(UserManagerBase); 397 DISALLOW_COPY_AND_ASSIGN(UserManagerBase);
393 }; 398 };
394 399
395 } // namespace user_manager 400 } // namespace user_manager
396 401
397 #endif // COMPONENTS_USER_MANAGER_USER_MANAGER_BASE_H_ 402 #endif // COMPONENTS_USER_MANAGER_USER_MANAGER_BASE_H_
OLDNEW
« no previous file with comments | « components/user_manager/user_manager.h ('k') | components/user_manager/user_manager_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698