| 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 aac1df566537c79dadcdf728c96f9c08a3acf59a..e8b69d18bf4fcfcc5467e5f367d6594e6deb4486 100644
|
| --- a/chrome/browser/managed_mode/managed_user_service.h
|
| +++ b/chrome/browser/managed_mode/managed_user_service.h
|
| @@ -11,15 +11,15 @@
|
| #include "base/callback.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/prefs/pref_change_registrar.h"
|
| +#include "base/scoped_observer.h"
|
| #include "base/strings/string16.h"
|
| #include "chrome/browser/managed_mode/managed_mode_url_filter.h"
|
| #include "chrome/browser/managed_mode/managed_users.h"
|
| #include "chrome/browser/sync/profile_sync_service_observer.h"
|
| #include "chrome/browser/ui/browser_list_observer.h"
|
| #include "components/keyed_service/core/keyed_service.h"
|
| -#include "content/public/browser/notification_observer.h"
|
| -#include "content/public/browser/notification_registrar.h"
|
| #include "content/public/browser/web_contents.h"
|
| +#include "extensions/browser/extension_registry_observer.h"
|
| #include "extensions/browser/management_policy.h"
|
|
|
| class Browser;
|
| @@ -31,6 +31,10 @@ class ManagedUserSettingsService;
|
| class PermissionRequestCreator;
|
| class Profile;
|
|
|
| +namespace extensions {
|
| +class ExtensionRegistry;
|
| +}
|
| +
|
| namespace user_prefs {
|
| class PrefRegistrySyncable;
|
| }
|
| @@ -41,7 +45,7 @@ class PrefRegistrySyncable;
|
| class ManagedUserService : public KeyedService,
|
| public extensions::ManagementPolicy::Provider,
|
| public ProfileSyncServiceObserver,
|
| - public content::NotificationObserver,
|
| + public extensions::ExtensionRegistryObserver,
|
| public chrome::BrowserListObserver {
|
| public:
|
| typedef std::vector<base::string16> CategoryList;
|
| @@ -145,10 +149,14 @@ class ManagedUserService : public KeyedService,
|
| // ProfileSyncServiceObserver implementation:
|
| virtual void OnStateChanged() OVERRIDE;
|
|
|
| - // content::NotificationObserver implementation:
|
| - virtual void Observe(int type,
|
| - const content::NotificationSource& source,
|
| - const content::NotificationDetails& details) OVERRIDE;
|
| + // extensions::ExtensionRegistryObserver implementation.
|
| + virtual void OnExtensionLoaded(
|
| + content::BrowserContext* browser_context,
|
| + const extensions::Extension* extension) OVERRIDE;
|
| + virtual void OnExtensionUnloaded(
|
| + content::BrowserContext* browser_context,
|
| + const extensions::Extension* extension,
|
| + extensions::UnloadedExtensionInfo::Reason reason) OVERRIDE;
|
|
|
| // chrome::BrowserListObserver implementation:
|
| virtual void OnBrowserSetLastActive(Browser* browser) OVERRIDE;
|
| @@ -230,7 +238,10 @@ class ManagedUserService : public KeyedService,
|
| // Owns us via the KeyedService mechanism.
|
| Profile* profile_;
|
|
|
| - content::NotificationRegistrar registrar_;
|
| + ScopedObserver<extensions::ExtensionRegistry,
|
| + extensions::ExtensionRegistryObserver>
|
| + extension_registry_observer_;
|
| +
|
| PrefChangeRegistrar pref_change_registrar_;
|
|
|
| // True iff we're waiting for the Sync service to be initialized.
|
|
|