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

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

Issue 2054773002: Replace the WAS_INSTALLED_BY_CUSTODIAN creation flag with a pref (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing the build Created 4 years, 6 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 | « chrome/browser/extensions/extension_sync_service.cc ('k') | chrome/browser/extensions/extension_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_util.h
diff --git a/chrome/browser/extensions/extension_util.h b/chrome/browser/extensions/extension_util.h
index 7fa21e4bbe8f8ba2d766a707e1eeaa7d44109a8e..5eb7f00b69e74fc7ad93aad8848bfc091976ac3c 100644
--- a/chrome/browser/extensions/extension_util.h
+++ b/chrome/browser/extensions/extension_util.h
@@ -63,6 +63,20 @@ void SetAllowFileAccess(const std::string& extension_id,
content::BrowserContext* context,
bool allow);
+// Returns true if this extension has been installed by the custodian of
+// a supervised user. It is relevant for supervised users and used to block
+// them from uninstalling the extension for example.
+bool WasInstalledByCustodian(const std::string& extension_id,
+ content::BrowserContext* context);
+
+// Sets whether |extension_id| is installed by a custodian.
+// This is relevant for supervised users and is used to limit their privileges
+// for extensions installed by their custodians (e.g. supervised users cannot
+// uninstall such extensions).
+void SetWasInstalledByCustodian(const std::string& extension_id,
+ content::BrowserContext* context,
+ bool installed_by_custodian);
+
// Returns true if the extension with |extension_id| is allowed to execute
// scripts on all urls (exempting chrome:// urls, etc) without explicit
// user consent.
@@ -131,7 +145,7 @@ bool IsNewBookmarkAppsEnabled();
bool CanHostedAppsOpenInWindows();
// Returns true for custodian-installed extensions in a supervised profile.
-bool IsExtensionSupervised(const Extension* extension, const Profile* profile);
+bool IsExtensionSupervised(const Extension* extension, Profile* profile);
// Returns true if supervised users need approval from their custodian for
// approving escalated permissions on updated extensions.
« no previous file with comments | « chrome/browser/extensions/extension_sync_service.cc ('k') | chrome/browser/extensions/extension_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698