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

Unified Diff: extensions/browser/management_policy.h

Issue 384423002: [Canceled] Extensions: Add install_flags parameter to ManagementPolicy::UserMayLoad (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update tests Created 6 years, 5 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
« no previous file with comments | « extensions/browser/extension_prefs.cc ('k') | extensions/browser/management_policy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/management_policy.h
diff --git a/extensions/browser/management_policy.h b/extensions/browser/management_policy.h
index 149a598fc38527e595a2be38dc08475ea62694a8..277fca17078e7e82b388e40e0f4d31a43a0080cf 100644
--- a/extensions/browser/management_policy.h
+++ b/extensions/browser/management_policy.h
@@ -52,6 +52,7 @@ class ManagementPolicy {
// Providers should return false if a user may not install the |extension|,
// or load or run it if it has already been installed.
virtual bool UserMayLoad(const Extension* extension,
+ int install_flags,
base::string16* error) const;
// Providers should return false if a user may not enable, disable, or
@@ -87,9 +88,14 @@ class ManagementPolicy {
void RegisterProvider(Provider* provider);
void UnregisterProvider(Provider* provider);
- // Returns true if the user is permitted to install, load, and run the given
+ // Returns true if the user is permitted to install, load and run the given
// extension. If not, |error| may be set to an appropriate message.
- bool UserMayLoad(const Extension* extension, base::string16* error) const;
+ // |install_flags| is a bitmask of extensions::InstallFlag. For extensions
+ // that are already installed, the flags can be queried with
+ // ExtensionPrefs::GetInstallFlags.
+ bool UserMayLoad(const Extension* extension,
+ int install_flags,
+ base::string16* error) const;
// Returns true if the user is permitted to enable, disable, or uninstall the
// given extension, or change the extension's usage options (incognito mode,
@@ -132,6 +138,10 @@ class ManagementPolicy {
const Extension* extension,
base::string16* error) const;
+ void LogProhibitedOperation(const char* debug_operation_name,
+ const Extension* extension,
+ const Provider* provider) const;
+
ProviderList providers_;
DISALLOW_COPY_AND_ASSIGN(ManagementPolicy);
« no previous file with comments | « extensions/browser/extension_prefs.cc ('k') | extensions/browser/management_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698