| 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 <map> | 8 #include <map> |
| 9 #include <memory> |
| 9 #include <set> | 10 #include <set> |
| 10 #include <string> | 11 #include <string> |
| 11 #include <vector> | 12 #include <vector> |
| 12 | 13 |
| 13 #include "base/macros.h" | 14 #include "base/macros.h" |
| 14 #include "base/memory/scoped_ptr.h" | |
| 15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
| 16 #include "base/observer_list.h" | 16 #include "base/observer_list.h" |
| 17 #include "base/synchronization/lock.h" | 17 #include "base/synchronization/lock.h" |
| 18 #include "base/time/time.h" | 18 #include "base/time/time.h" |
| 19 #include "components/signin/core/account_id/account_id.h" | 19 #include "components/signin/core/account_id/account_id.h" |
| 20 #include "components/user_manager/user.h" | 20 #include "components/user_manager/user.h" |
| 21 #include "components/user_manager/user_manager.h" | 21 #include "components/user_manager/user_manager.h" |
| 22 #include "components/user_manager/user_manager_export.h" | 22 #include "components/user_manager/user_manager_export.h" |
| 23 #include "components/user_manager/user_type.h" | 23 #include "components/user_manager/user_type.h" |
| 24 | 24 |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 | 321 |
| 322 // Sends metrics in response to a user with gaia account (regular) logging in. | 322 // Sends metrics in response to a user with gaia account (regular) logging in. |
| 323 void SendGaiaUserLoginMetrics(const AccountId& account_id); | 323 void SendGaiaUserLoginMetrics(const AccountId& account_id); |
| 324 | 324 |
| 325 // Sets account locale for user with id |account_id|. | 325 // Sets account locale for user with id |account_id|. |
| 326 virtual void UpdateUserAccountLocale(const AccountId& account_id, | 326 virtual void UpdateUserAccountLocale(const AccountId& account_id, |
| 327 const std::string& locale); | 327 const std::string& locale); |
| 328 | 328 |
| 329 // Updates user account after locale was resolved. | 329 // Updates user account after locale was resolved. |
| 330 void DoUpdateAccountLocale(const AccountId& account_id, | 330 void DoUpdateAccountLocale(const AccountId& account_id, |
| 331 scoped_ptr<std::string> resolved_locale); | 331 std::unique_ptr<std::string> resolved_locale); |
| 332 | 332 |
| 333 // Indicates stage of loading user from prefs. | 333 // Indicates stage of loading user from prefs. |
| 334 UserLoadStage user_loading_stage_ = STAGE_NOT_LOADED; | 334 UserLoadStage user_loading_stage_ = STAGE_NOT_LOADED; |
| 335 | 335 |
| 336 // True if SessionStarted() has been called. | 336 // True if SessionStarted() has been called. |
| 337 bool session_started_ = false; | 337 bool session_started_ = false; |
| 338 | 338 |
| 339 // Cached flag of whether currently logged-in user is owner or not. | 339 // Cached flag of whether currently logged-in user is owner or not. |
| 340 // May be accessed on different threads, requires locking. | 340 // May be accessed on different threads, requires locking. |
| 341 bool is_current_user_owner_ = false; | 341 bool is_current_user_owner_ = false; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 scoped_refptr<base::TaskRunner> task_runner_; | 384 scoped_refptr<base::TaskRunner> task_runner_; |
| 385 | 385 |
| 386 base::WeakPtrFactory<UserManagerBase> weak_factory_; | 386 base::WeakPtrFactory<UserManagerBase> weak_factory_; |
| 387 | 387 |
| 388 DISALLOW_COPY_AND_ASSIGN(UserManagerBase); | 388 DISALLOW_COPY_AND_ASSIGN(UserManagerBase); |
| 389 }; | 389 }; |
| 390 | 390 |
| 391 } // namespace user_manager | 391 } // namespace user_manager |
| 392 | 392 |
| 393 #endif // COMPONENTS_USER_MANAGER_USER_MANAGER_BASE_H_ | 393 #endif // COMPONENTS_USER_MANAGER_USER_MANAGER_BASE_H_ |
| OLD | NEW |