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

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

Issue 2438063002: user_manager: Remove deps on session_manager (Closed)
Patch Set: fix nits in PS1 Created 4 years, 2 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 void Shutdown() override; 50 void Shutdown() override;
51 const UserList& GetUsers() const override; 51 const UserList& GetUsers() const override;
52 const UserList& GetLoggedInUsers() const override; 52 const UserList& GetLoggedInUsers() const override;
53 const UserList& GetLRULoggedInUsers() const override; 53 const UserList& GetLRULoggedInUsers() const override;
54 const AccountId& GetOwnerAccountId() const override; 54 const AccountId& GetOwnerAccountId() const override;
55 void UserLoggedIn(const AccountId& account_id, 55 void UserLoggedIn(const AccountId& account_id,
56 const std::string& user_id_hash, 56 const std::string& user_id_hash,
57 bool browser_restart) override; 57 bool browser_restart) override;
58 void SwitchActiveUser(const AccountId& account_id) override; 58 void SwitchActiveUser(const AccountId& account_id) override;
59 void SwitchToLastActiveUser() override; 59 void SwitchToLastActiveUser() override;
60 void SessionStarted() override; 60 void OnSessionStarted() override;
61 void RemoveUser(const AccountId& account_id, 61 void RemoveUser(const AccountId& account_id,
62 RemoveUserDelegate* delegate) override; 62 RemoveUserDelegate* delegate) override;
63 void RemoveUserFromList(const AccountId& account_id) override; 63 void RemoveUserFromList(const AccountId& account_id) override;
64 bool IsKnownUser(const AccountId& account_id) const override; 64 bool IsKnownUser(const AccountId& account_id) const override;
65 const User* FindUser(const AccountId& account_id) const override; 65 const User* FindUser(const AccountId& account_id) const override;
66 User* FindUserAndModify(const AccountId& account_id) override; 66 User* FindUserAndModify(const AccountId& account_id) override;
67 const User* GetLoggedInUser() const override; 67 const User* GetLoggedInUser() const override;
68 User* GetLoggedInUser() override; 68 User* GetLoggedInUser() override;
69 const User* GetActiveUser() const override; 69 const User* GetActiveUser() const override;
70 User* GetActiveUser() override; 70 User* GetActiveUser() override;
(...skipping 18 matching lines...) Expand all
89 bool IsCurrentUserCryptohomeDataEphemeral() const override; 89 bool IsCurrentUserCryptohomeDataEphemeral() const override;
90 bool CanCurrentUserLock() const override; 90 bool CanCurrentUserLock() const override;
91 bool IsUserLoggedIn() const override; 91 bool IsUserLoggedIn() const override;
92 bool IsLoggedInAsUserWithGaiaAccount() const override; 92 bool IsLoggedInAsUserWithGaiaAccount() const override;
93 bool IsLoggedInAsChildUser() const override; 93 bool IsLoggedInAsChildUser() const override;
94 bool IsLoggedInAsPublicAccount() const override; 94 bool IsLoggedInAsPublicAccount() const override;
95 bool IsLoggedInAsGuest() const override; 95 bool IsLoggedInAsGuest() const override;
96 bool IsLoggedInAsSupervisedUser() const override; 96 bool IsLoggedInAsSupervisedUser() const override;
97 bool IsLoggedInAsKioskApp() const override; 97 bool IsLoggedInAsKioskApp() const override;
98 bool IsLoggedInAsStub() const override; 98 bool IsLoggedInAsStub() const override;
99 bool IsSessionStarted() const override;
100 bool IsUserNonCryptohomeDataEphemeral( 99 bool IsUserNonCryptohomeDataEphemeral(
101 const AccountId& account_id) const override; 100 const AccountId& account_id) const override;
102 bool IsUserCryptohomeDataEphemeral( 101 bool IsUserCryptohomeDataEphemeral(
103 const AccountId& account_id) const override; 102 const AccountId& account_id) const override;
104 void AddObserver(UserManager::Observer* obs) override; 103 void AddObserver(UserManager::Observer* obs) override;
105 void RemoveObserver(UserManager::Observer* obs) override; 104 void RemoveObserver(UserManager::Observer* obs) override;
106 void AddSessionStateObserver( 105 void AddSessionStateObserver(
107 UserManager::UserSessionStateObserver* obs) override; 106 UserManager::UserSessionStateObserver* obs) override;
108 void RemoveSessionStateObserver( 107 void RemoveSessionStateObserver(
109 UserManager::UserSessionStateObserver* obs) override; 108 UserManager::UserSessionStateObserver* obs) override;
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 virtual void UpdateUserAccountLocale(const AccountId& account_id, 328 virtual void UpdateUserAccountLocale(const AccountId& account_id,
330 const std::string& locale); 329 const std::string& locale);
331 330
332 // Updates user account after locale was resolved. 331 // Updates user account after locale was resolved.
333 void DoUpdateAccountLocale(const AccountId& account_id, 332 void DoUpdateAccountLocale(const AccountId& account_id,
334 std::unique_ptr<std::string> resolved_locale); 333 std::unique_ptr<std::string> resolved_locale);
335 334
336 // Indicates stage of loading user from prefs. 335 // Indicates stage of loading user from prefs.
337 UserLoadStage user_loading_stage_ = STAGE_NOT_LOADED; 336 UserLoadStage user_loading_stage_ = STAGE_NOT_LOADED;
338 337
339 // True if SessionStarted() has been called.
340 bool session_started_ = false;
341
342 // Cached flag of whether currently logged-in user is owner or not. 338 // Cached flag of whether currently logged-in user is owner or not.
343 // May be accessed on different threads, requires locking. 339 // May be accessed on different threads, requires locking.
344 bool is_current_user_owner_ = false; 340 bool is_current_user_owner_ = false;
345 mutable base::Lock is_current_user_owner_lock_; 341 mutable base::Lock is_current_user_owner_lock_;
346 342
347 // Cached flag of whether the currently logged-in user existed before this 343 // Cached flag of whether the currently logged-in user existed before this
348 // login. 344 // login.
349 bool is_current_user_new_ = false; 345 bool is_current_user_new_ = false;
350 346
351 // Cached flag of whether the currently logged-in user is a regular user who 347 // Cached flag of whether the currently logged-in user is a regular user who
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 scoped_refptr<base::TaskRunner> task_runner_; 383 scoped_refptr<base::TaskRunner> task_runner_;
388 384
389 base::WeakPtrFactory<UserManagerBase> weak_factory_; 385 base::WeakPtrFactory<UserManagerBase> weak_factory_;
390 386
391 DISALLOW_COPY_AND_ASSIGN(UserManagerBase); 387 DISALLOW_COPY_AND_ASSIGN(UserManagerBase);
392 }; 388 };
393 389
394 } // namespace user_manager 390 } // namespace user_manager
395 391
396 #endif // COMPONENTS_USER_MANAGER_USER_MANAGER_BASE_H_ 392 #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