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

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

Issue 10382149: Refactor the various ways to control what users can do to extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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/extension_prefs.h
===================================================================
--- chrome/browser/extensions/extension_prefs.h (revision 138227)
+++ chrome/browser/extensions/extension_prefs.h (working copy)
@@ -16,6 +16,7 @@
#include "chrome/browser/extensions/api/content_settings/content_settings_store.h"
#include "chrome/browser/extensions/extension_prefs_scope.h"
#include "chrome/browser/extensions/extension_scoped_prefs.h"
+#include "chrome/browser/extensions/management_policy.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/string_ordinal.h"
@@ -45,6 +46,7 @@
// PrefValueStore::extension_prefs(), which this class populates and
// maintains as the underlying extensions change.
class ExtensionPrefs : public extensions::ContentSettingsStore::Observer,
+ public extensions::ManagementPolicy::Provider,
public ExtensionScopedPrefs {
public:
// Key name for a preference that keeps track of per-extension settings. This
@@ -206,10 +208,12 @@
bool IsAppNotificationDisabled(const std::string& extension_id) const;
void SetAppNotificationDisabled(const std::string& extension_id, bool value);
- // Is the extension with |extension_id| allowed by policy (checking both
- // whitelist and blacklist).
- bool IsExtensionAllowedByPolicy(const std::string& extension_id,
- extensions::Extension::Location location) const;
+ // ManagementPolicy::Provider
Pam (message me for reviews) 2012/05/22 12:51:07 On 2012/05/17 22:41:06, Aaron Boodman wrote: > We
+ virtual std::string PolicyProviderName() const OVERRIDE;
+ // Retruns true if the extension is allowed by admin policy.
Aaron Boodman 2012/05/24 08:11:23 sp: Retruns
+ virtual bool UserMayLoad(const extensions::Extension* extension,
Pam (message me for reviews) 2012/05/22 12:51:07 I clarified that this particular management policy
Aaron Boodman 2012/05/22 15:56:11 Ah. You could make that more self-documenting and
Pam (message me for reviews) 2012/05/23 15:00:58 How important is this to you? It feels like overco
Aaron Boodman 2012/05/24 08:11:23 Shrug, ok.
+ extensions::Extension::Location location,
+ string16* error) const OVERRIDE;
// Checks if extensions are blacklisted by default, by policy. When true, this
// means that even extensions without an ID should be blacklisted (e.g.

Powered by Google App Engine
This is Rietveld 408576698