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

Unified Diff: chrome/browser/managed_mode/managed_user_service.h

Issue 316813002: Start managed_mode refactor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove DCHECKs Created 6 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/managed_mode/managed_user_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/managed_mode/managed_user_service.h
diff --git a/chrome/browser/managed_mode/managed_user_service.h b/chrome/browser/managed_mode/managed_user_service.h
index e8b69d18bf4fcfcc5467e5f367d6594e6deb4486..6d90daf4a2747c0050100edd16bda440a6319d7e 100644
--- a/chrome/browser/managed_mode/managed_user_service.h
+++ b/chrome/browser/managed_mode/managed_user_service.h
@@ -58,6 +58,14 @@ class ManagedUserService : public KeyedService,
MANUAL_BLOCK
};
+ class Delegate {
+ public:
+ virtual ~Delegate() {}
+ // Returns true to indicate that the delegate handled the (de)activation, or
+ // false to indicate that the ManagedUserService itself should handle it.
+ virtual bool SetActive(bool active) = 0;
+ };
+
virtual ~ManagedUserService();
// ProfileKeyedService override:
@@ -67,6 +75,8 @@ class ManagedUserService : public KeyedService,
static void MigrateUserPrefs(PrefService* prefs);
+ void SetDelegate(Delegate* delegate);
+
// Returns the URL filter for the IO thread, for filtering network requests
// (in ManagedModeResourceThrottle).
scoped_refptr<const ManagedModeURLFilter> GetURLFilterForIOThread();
@@ -200,6 +210,8 @@ class ManagedUserService : public KeyedService,
// an instance of this service.
explicit ManagedUserService(Profile* profile);
+ void SetActive(bool active);
+
void OnCustodianProfileDownloaded(const base::string16& full_name);
void OnManagedUserRegistered(const AuthErrorCallback& callback,
@@ -223,6 +235,8 @@ class ManagedUserService : public KeyedService,
ManagedUserSettingsService* GetSettingsService();
+ void OnManagedUserIdChanged();
+
void OnDefaultFilteringBehaviorChanged();
void UpdateSiteLists();
@@ -238,6 +252,10 @@ class ManagedUserService : public KeyedService,
// Owns us via the KeyedService mechanism.
Profile* profile_;
+ bool active_;
+
+ Delegate* delegate_;
+
ScopedObserver<extensions::ExtensionRegistry,
extensions::ExtensionRegistryObserver>
extension_registry_observer_;
« no previous file with comments | « no previous file | chrome/browser/managed_mode/managed_user_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698