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

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: Rebase. 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 a0b434ff808559354c3b767d3ecb52e00f352a16..dcab4426374658b47445a2baf713f1ce5e79aef9 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
@@ -38,6 +43,8 @@ class ChildAccountService : public KeyedService,
static bool IsChildAccountDetectionEnabled();
+ static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
+
void Init();
// Sets whether the signed-in account is a child account.
@@ -45,9 +52,15 @@ class ChildAccountService : public KeyedService,
// happens outside of this class (like Android).
void SetIsChildAccount(bool is_child_account);
+ // Responds whether at least one request for child status was successful.
+ // And we got answer whether the profile belongs to a child account or not.
+ bool IsChildAccountStatusKnown();
+
// KeyedService:
void Shutdown() override;
+ void AddChildStatusReceivedCallback(const base::Closure& callback);
+
private:
friend class ChildAccountServiceFactory;
// Use |ChildAccountServiceFactory::GetForProfile(...)| to get an instance of
@@ -111,6 +124,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);
« no previous file with comments | « chrome/browser/prefs/browser_prefs.cc ('k') | chrome/browser/supervised_user/child_accounts/child_account_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698