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

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: 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..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);
};

Powered by Google App Engine
This is Rietveld 408576698