Chromium Code Reviews| Index: chrome/browser/extensions/external_policy_loader.h |
| diff --git a/chrome/browser/extensions/external_policy_loader.h b/chrome/browser/extensions/external_policy_loader.h |
| index fecd54df33f6bb91dafe871cf9a1ff9ebe9a8445..b7f858335de0393103d9803ccad730e0dc4de63e 100644 |
| --- a/chrome/browser/extensions/external_policy_loader.h |
| +++ b/chrome/browser/extensions/external_policy_loader.h |
| @@ -8,10 +8,8 @@ |
| #include <string> |
| #include "base/compiler_specific.h" |
| -#include "base/prefs/pref_change_registrar.h" |
| +#include "chrome/browser/extensions/extension_management.h" |
| #include "chrome/browser/extensions/external_loader.h" |
| -#include "content/public/browser/notification_observer.h" |
| -#include "content/public/browser/notification_registrar.h" |
| class Profile; |
| @@ -21,19 +19,15 @@ class DictionaryValue; |
| namespace extensions { |
| -// A specialization of the ExternalProvider that uses |
| -// pref_names::kInstallForceList to look up which external extensions are |
| -// registered. |
| -class ExternalPolicyLoader |
| - : public ExternalLoader, |
| - public content::NotificationObserver { |
| +// A specialization of the ExternalProvider that uses extension management |
| +// policies to look up which external extensions are registered. |
| +class ExternalPolicyLoader : public ExternalLoader, |
| + public ExtensionManagement::Observer { |
| public: |
| explicit ExternalPolicyLoader(Profile* profile); |
|
Joao da Silva
2014/09/04 12:07:46
This doesn't really need a Profile, just an Extens
binjin
2014/09/04 14:27:06
Done. But I don't know how to simplify the tests:
|
| - // content::NotificationObserver implementation |
| - virtual void Observe(int type, |
| - const content::NotificationSource& source, |
| - const content::NotificationDetails& details) OVERRIDE; |
| + // ExtensionManagement::Observer implementation |
| + virtual void OnExtensionManagementSettingsChanged() OVERRIDE; |
| // Adds an extension to be updated to the pref dictionary. |
| static void AddExtension(base::DictionaryValue* dict, |
| @@ -46,12 +40,9 @@ class ExternalPolicyLoader |
| private: |
| friend class base::RefCountedThreadSafe<ExternalLoader>; |
| - virtual ~ExternalPolicyLoader() {} |
| + virtual ~ExternalPolicyLoader(); |
| - PrefChangeRegistrar pref_change_registrar_; |
| - content::NotificationRegistrar notification_registrar_; |
| - |
| - Profile* profile_; |
| + ExtensionManagement* settings_; |
| DISALLOW_COPY_AND_ASSIGN(ExternalPolicyLoader); |
| }; |