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_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 <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
79 virtual std::string GetUserDisplayEmail( | 79 virtual std::string GetUserDisplayEmail( |
80 const std::string& user_id) const override; | 80 const std::string& user_id) const override; |
81 virtual void UpdateUserAccountData( | 81 virtual void UpdateUserAccountData( |
82 const std::string& user_id, | 82 const std::string& user_id, |
83 const UserAccountData& account_data) override; | 83 const UserAccountData& account_data) override; |
84 virtual bool IsCurrentUserOwner() const override; | 84 virtual bool IsCurrentUserOwner() const override; |
85 virtual bool IsCurrentUserNew() const override; | 85 virtual bool IsCurrentUserNew() const override; |
86 virtual bool IsCurrentUserNonCryptohomeDataEphemeral() const override; | 86 virtual bool IsCurrentUserNonCryptohomeDataEphemeral() const override; |
87 virtual bool CanCurrentUserLock() const override; | 87 virtual bool CanCurrentUserLock() const override; |
88 virtual bool IsUserLoggedIn() const override; | 88 virtual bool IsUserLoggedIn() const override; |
89 virtual bool IsLoggedInAsRegularUser() const override; | 89 virtual bool IsLoggedInAsUserWithGaiaAccount() const override; |
90 virtual bool IsLoggedInAsRegularSupervisedUser() const override; | |
90 virtual bool IsLoggedInAsDemoUser() const override; | 91 virtual bool IsLoggedInAsDemoUser() const override; |
91 virtual bool IsLoggedInAsPublicAccount() const override; | 92 virtual bool IsLoggedInAsPublicAccount() const override; |
92 virtual bool IsLoggedInAsGuest() const override; | 93 virtual bool IsLoggedInAsGuest() const override; |
93 virtual bool IsLoggedInAsSupervisedUser() const override; | 94 virtual bool IsLoggedInAsSupervisedUser() const override; |
94 virtual bool IsLoggedInAsKioskApp() const override; | 95 virtual bool IsLoggedInAsKioskApp() const override; |
95 virtual bool IsLoggedInAsStub() const override; | 96 virtual bool IsLoggedInAsStub() const override; |
96 virtual bool IsSessionStarted() const override; | 97 virtual bool IsSessionStarted() const override; |
97 virtual bool IsUserNonCryptohomeDataEphemeral( | 98 virtual bool IsUserNonCryptohomeDataEphemeral( |
98 const std::string& user_id) const override; | 99 const std::string& user_id) const override; |
99 virtual void AddObserver(UserManager::Observer* obs) override; | 100 virtual void AddObserver(UserManager::Observer* obs) override; |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
300 | 301 |
301 // Notifies observers that active user_id hash has changed. | 302 // Notifies observers that active user_id hash has changed. |
302 void NotifyActiveUserHashChanged(const std::string& hash); | 303 void NotifyActiveUserHashChanged(const std::string& hash); |
303 | 304 |
304 // Update the global LoginState. | 305 // Update the global LoginState. |
305 void UpdateLoginState(); | 306 void UpdateLoginState(); |
306 | 307 |
307 // Insert |user| at the front of the LRU user list. | 308 // Insert |user| at the front of the LRU user list. |
308 void SetLRUUser(User* user); | 309 void SetLRUUser(User* user); |
309 | 310 |
310 // Sends metrics in response to a regular user logging in. | 311 // Sends metrics in response to a user with gaia account (regular) logging in. |
bartfab (slow)
2014/11/27 12:51:51
Nit 1: s/gaia/a gaia/
Nit 2: I am not sure the "re
| |
311 void SendRegularUserLoginMetrics(const std::string& user_id); | 312 void SendGaiaUserLoginMetrics(const std::string& user_id); |
312 | 313 |
313 // Sets account locale for user with id |user_id|. | 314 // Sets account locale for user with id |user_id|. |
314 virtual void UpdateUserAccountLocale(const std::string& user_id, | 315 virtual void UpdateUserAccountLocale(const std::string& user_id, |
315 const std::string& locale); | 316 const std::string& locale); |
316 | 317 |
317 // Updates user account after locale was resolved. | 318 // Updates user account after locale was resolved. |
318 void DoUpdateAccountLocale(const std::string& user_id, | 319 void DoUpdateAccountLocale(const std::string& user_id, |
319 scoped_ptr<std::string> resolved_locale); | 320 scoped_ptr<std::string> resolved_locale); |
320 | 321 |
321 // Indicates stage of loading user from prefs. | 322 // Indicates stage of loading user from prefs. |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
384 scoped_refptr<base::TaskRunner> blocking_task_runner_; | 385 scoped_refptr<base::TaskRunner> blocking_task_runner_; |
385 | 386 |
386 base::WeakPtrFactory<UserManagerBase> weak_factory_; | 387 base::WeakPtrFactory<UserManagerBase> weak_factory_; |
387 | 388 |
388 DISALLOW_COPY_AND_ASSIGN(UserManagerBase); | 389 DISALLOW_COPY_AND_ASSIGN(UserManagerBase); |
389 }; | 390 }; |
390 | 391 |
391 } // namespace user_manager | 392 } // namespace user_manager |
392 | 393 |
393 #endif // COMPONENTS_USER_MANAGER_USER_MANAGER_BASE_H_ | 394 #endif // COMPONENTS_USER_MANAGER_USER_MANAGER_BASE_H_ |
OLD | NEW |