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

Unified Diff: chrome/browser/supervised_user/child_accounts/child_account_service.h

Issue 971383002: Removing FRE UI for unicorn accounts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clean-up. Created 5 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 side-by-side diff with in-line comments
Download patch
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..958260ba73441a3bd55273bfedf62e952578d9e4 100644
--- a/chrome/browser/supervised_user/child_accounts/child_account_service.h
+++ b/chrome/browser/supervised_user/child_accounts/child_account_service.h
@@ -11,8 +11,10 @@
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
+#include "base/observer_list.h"
#include "base/time/time.h"
#include "base/timer/timer.h"
+#include "chrome/browser/supervised_user/child_accounts/child_account_status_observer.h"
#include "chrome/browser/supervised_user/child_accounts/family_info_fetcher.h"
#include "chrome/browser/supervised_user/supervised_user_service.h"
#include "components/keyed_service/core/keyed_service.h"
@@ -24,6 +26,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 +42,9 @@ class ChildAccountService : public KeyedService,
public:
~ChildAccountService() override;
+ // Registers the preferences related to Child Account Service.
Bernhard Bauer 2015/03/10 09:55:12 This comment is redundant.
merkulova 2015/03/10 11:53:57 Done.
+ static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
+
void Init();
// Sets whether the signed-in account is a child account.
@@ -43,9 +52,15 @@ class ChildAccountService : public KeyedService,
// happens outside of this class (like Android).
void SetIsChildAccount(bool is_child_account);
+ bool IsChildAccountStatusKnown();
+
// KeyedService:
void Shutdown() override;
+ // Adds/removes observer.
+ void AddStatusObserver(ChildAccountStatusObserver* observer);
+ void RemoveStatusObserver(ChildAccountStatusObserver* observer);
+
private:
friend class ChildAccountServiceFactory;
// Use |ChildAccountServiceFactory::GetForProfile(...)| to get an instance of
@@ -109,6 +124,8 @@ class ChildAccountService : public KeyedService,
base::OneShotTimer<ChildAccountService> family_fetch_timer_;
net::BackoffEntry family_fetch_backoff_;
+ ObserverList<ChildAccountStatusObserver> observer_list_;
+
base::WeakPtrFactory<ChildAccountService> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(ChildAccountService);

Powered by Google App Engine
This is Rietveld 408576698