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

Unified Diff: chrome/browser/extensions/external_policy_loader.h

Issue 536573003: Add ExtensionManagement based ExternalLoader (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ext-2
Patch Set: rebase Created 6 years, 3 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/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..a08e9ed5604d65f31a79f66efc6768eea6dc59a7 100644
--- a/chrome/browser/extensions/external_policy_loader.h
+++ b/chrome/browser/extensions/external_policy_loader.h
@@ -8,12 +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;
namespace base {
class DictionaryValue;
@@ -21,19 +17,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);
+ explicit ExternalPolicyLoader(ExtensionManagement* settings);
- // 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 +38,9 @@ class ExternalPolicyLoader
private:
friend class base::RefCountedThreadSafe<ExternalLoader>;
- virtual ~ExternalPolicyLoader() {}
-
- PrefChangeRegistrar pref_change_registrar_;
- content::NotificationRegistrar notification_registrar_;
+ virtual ~ExternalPolicyLoader();
- Profile* profile_;
+ ExtensionManagement* settings_;
DISALLOW_COPY_AND_ASSIGN(ExternalPolicyLoader);
};
« no previous file with comments | « chrome/browser/extensions/extension_management.cc ('k') | chrome/browser/extensions/external_policy_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698