| Index: extensions/browser/extension_prefs.cc
|
| diff --git a/extensions/browser/extension_prefs.cc b/extensions/browser/extension_prefs.cc
|
| index f18fad80e3d2020704f25d8482d0aedc3852167c..7333297f072dc3e6b64bf6e894b84aa61b999115 100644
|
| --- a/extensions/browser/extension_prefs.cc
|
| +++ b/extensions/browser/extension_prefs.cc
|
| @@ -122,6 +122,10 @@ const char kPrefAllowFileAccess[] = "newAllowFileAccess";
|
| // the old flag and possibly go back to that name.
|
| // const char kPrefAllowFileAccessOld[] = "allowFileAccess";
|
|
|
| +// A preference that is relevant only for supervised users
|
| +// and used to flag an extension as installed by custodian.
|
| +const char kPrefWasInstalledByCustodian[] = "wasInstalledByCustodian";
|
| +
|
| // A preference specifying if the user dragged the app on the NTP.
|
| const char kPrefUserDraggedApp[] = "user_dragged_app_ntp";
|
|
|
| @@ -1041,6 +1045,17 @@ bool ExtensionPrefs::HasAllowFileAccessSetting(
|
| return ext && ext->HasKey(kPrefAllowFileAccess);
|
| }
|
|
|
| +bool ExtensionPrefs::WasInstalledByCustodian(
|
| + const std::string& extension_id) const {
|
| + return ReadPrefAsBooleanAndReturn(extension_id, kPrefWasInstalledByCustodian);
|
| +}
|
| +
|
| +void ExtensionPrefs::SetWasInstalledByCustodian(const std::string& extension_id,
|
| + bool installed_by_custodian) {
|
| + UpdateExtensionPref(extension_id, kPrefWasInstalledByCustodian,
|
| + new base::FundamentalValue(installed_by_custodian));
|
| +}
|
| +
|
| bool ExtensionPrefs::DoesExtensionHaveState(
|
| const std::string& id, Extension::State check_state) const {
|
| const base::DictionaryValue* extension = GetExtensionPref(id);
|
|
|