Chromium Code Reviews| Index: chrome/browser/supervised_user/child_accounts/child_account_service.h |
| diff --git a/chrome/browser/supervised_user/child_accounts/child_account_service.h b/chrome/browser/supervised_user/child_accounts/child_account_service.h |
| index 4a1519670d151ea72d94199ac39cda71cf43e7db..35d79774eeccca2bcf3b5cdbd22d1abff7c6c856 100644 |
| --- a/chrome/browser/supervised_user/child_accounts/child_account_service.h |
| +++ b/chrome/browser/supervised_user/child_accounts/child_account_service.h |
| @@ -8,6 +8,7 @@ |
| #include <string> |
| #include <vector> |
| +#include "base/callback.h" |
| #include "base/macros.h" |
| #include "base/memory/scoped_ptr.h" |
| #include "base/memory/weak_ptr.h" |
| @@ -24,6 +25,10 @@ namespace base { |
| class FilePath; |
| } |
| +namespace user_prefs { |
| +class PrefRegistrySyncable; |
| +} |
| + |
| class Profile; |
| // This class handles detection of child accounts (on sign-in as well as on |
| @@ -36,6 +41,8 @@ class ChildAccountService : public KeyedService, |
| public: |
| ~ChildAccountService() override; |
| + static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| + |
| void Init(); |
| // Sets whether the signed-in account is a child account. |
| @@ -43,9 +50,13 @@ class ChildAccountService : public KeyedService, |
| // happens outside of this class (like Android). |
| void SetIsChildAccount(bool is_child_account); |
| + bool IsChildAccountStatusKnown(); |
| + |
| // KeyedService: |
| void Shutdown() override; |
| + void AddChildStatusReceivedCallback(base::Closure callback); |
|
Marc Treib
2015/03/10 12:01:35
const base::Closure&
Bernhard Bauer
2015/03/10 12:02:44
Pass the callback as const ref.
merkulova
2015/03/10 13:36:18
Done.
merkulova
2015/03/10 13:36:18
Done.
|
| + |
| private: |
| friend class ChildAccountServiceFactory; |
| // Use |ChildAccountServiceFactory::GetForProfile(...)| to get an instance of |
| @@ -109,6 +120,9 @@ class ChildAccountService : public KeyedService, |
| base::OneShotTimer<ChildAccountService> family_fetch_timer_; |
| net::BackoffEntry family_fetch_backoff_; |
| + // Callbacks to run when the user status becomes known. |
| + std::vector<base::Closure> status_received_callback_list_; |
| + |
| base::WeakPtrFactory<ChildAccountService> weak_ptr_factory_; |
| DISALLOW_COPY_AND_ASSIGN(ChildAccountService); |