Commit 99b4b74d authored by Josh Pratt's avatar Josh Pratt Committed by Commit Bot

Add pref for crostini USB Device sharing settings

Bug: 899568
Change-Id: Ida5e475179d77010956a59411cc4872973fc18f4
Reviewed-on: https://chromium-review.googlesource.com/c/1345699
Commit-Queue: Josh Pratt <jopra@chromium.org>
Reviewed-by: default avatarNicholas Verne <nverne@chromium.org>
Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613431}
parent d912a9a5
......@@ -16,6 +16,10 @@ const char kCrostiniMimeTypes[] = "crostini.mime_types";
const char kCrostiniRegistry[] = "crostini.registry";
// List of filesystem paths that are shared with the crostini container.
const char kCrostiniSharedPaths[] = "crostini.shared_paths";
// List of USB devices with their system guid, a name/description and their
// enabled state for use with Crostini.
const char kCrostiniSharedUsbDevices[] = "crostini.shared_usb_devices";
// A boolean preference representing a user level enterprise policy to enable
// Crostini use.
const char kUserCrostiniAllowedByPolicy[] = "crostini.user_allowed_by_policy";
......@@ -36,6 +40,7 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) {
registry->RegisterDictionaryPref(kCrostiniMimeTypes);
registry->RegisterDictionaryPref(kCrostiniRegistry);
registry->RegisterListPref(kCrostiniSharedPaths);
registry->RegisterListPref(kCrostiniSharedUsbDevices);
registry->RegisterBooleanPref(crostini::prefs::kReportCrostiniUsageEnabled,
false);
registry->RegisterStringPref(kCrostiniLastLaunchVersion, std::string());
......
......@@ -14,6 +14,8 @@ extern const char kCrostiniEnabled[];
extern const char kCrostiniMimeTypes[];
extern const char kCrostiniRegistry[];
extern const char kCrostiniSharedPaths[];
extern const char kCrostiniSharedUsbDevices[];
extern const char kUserCrostiniAllowedByPolicy[];
extern const char kReportCrostiniUsageEnabled[];
......
......@@ -368,6 +368,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetWhitelistedKeys() {
settings_api::PrefType::PREF_TYPE_BOOLEAN;
(*s_whitelist)[crostini::prefs::kCrostiniSharedPaths] =
settings_api::PrefType::PREF_TYPE_LIST;
(*s_whitelist)[crostini::prefs::kCrostiniSharedUsbDevices] =
settings_api::PrefType::PREF_TYPE_LIST;
// Android Apps.
(*s_whitelist)[arc::prefs::kArcEnabled] =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment