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

Unified Diff: extensions/browser/extension_prefs.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: Response to code review by treib@ 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
Index: extensions/browser/extension_prefs.h
diff --git a/extensions/browser/extension_prefs.h b/extensions/browser/extension_prefs.h
index bae2126e755715670b87d5f5e1af6f103330df54..f0671c9639e437f598635d5c8d6203ce143de10c 100644
--- a/extensions/browser/extension_prefs.h
+++ b/extensions/browser/extension_prefs.h
@@ -409,6 +409,13 @@ class ExtensionPrefs : public ExtensionScopedPrefs, public KeyedService {
void SetAllowFileAccess(const std::string& extension_id, bool allow);
bool HasAllowFileAccessSetting(const std::string& extension_id) const;
+ // 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) const;
+ void SetWasInstalledByCustodian(const std::string& extension_id,
Devlin 2016/06/13 14:36:58 We should remove these and just use the generic Up
mamir 2016/06/13 15:25:31 But other prefs such as IsIcognitoEnabled, AllowFi
Devlin 2016/06/13 15:41:43 We should do everything through Set/Get extension
mamir 2016/06/13 18:02:47 Done.
+ bool installed_by_custodian);
+
// Saves ExtensionInfo for each installed extension with the path to the
// version directory and the location. Blacklisted extensions won't be saved
// and neither will external extensions the user has explicitly uninstalled.

Powered by Google App Engine
This is Rietveld 408576698