Commit 376781fd authored by Joel Hockey's avatar Joel Hockey Committed by Commit Bot

CrOS FilesApp: Allow share drive computer volumes with crostini

We currently have COMPUTERS_GRAND_ROOT as a sharable volume, but
once you drill into a specific Drive Computer, the volume is COMPUTER.

Bug: 878324
Change-Id: I25a4bf377200b37c9e5914ad558a3596484f4915
Reviewed-on: https://chromium-review.googlesource.com/c/1300354Reviewed-by: default avatarLuciano Pacheco <lucmult@chromium.org>
Commit-Queue: Joel Hockey <joelhockey@chromium.org>
Cr-Commit-Position: refs/heads/master@{#603004}
parent 1e545ff9
......@@ -17,6 +17,7 @@ Crostini.IS_CROSTINI_FILES_ENABLED = false;
*/
Crostini.VALID_ROOT_TYPES_FOR_SHARE = new Map([
[VolumeManagerCommon.RootType.COMPUTERS_GRAND_ROOT, 'DriveComputers'],
[VolumeManagerCommon.RootType.COMPUTER, 'DriveComputers'],
[VolumeManagerCommon.RootType.DOWNLOADS, 'Downloads'],
[VolumeManagerCommon.RootType.DRIVE, 'MyDrive'],
[VolumeManagerCommon.RootType.TEAM_DRIVE, 'TeamDrive'],
......
......@@ -64,9 +64,7 @@ function testCanSharePath() {
assertFalse(Crostini.canSharePath(fooFolder, true, volumeManager));
assertFalse(Crostini.canSharePath(fooFolder, false, volumeManager));
for (type of
['downloads', 'drive', 'team_drive', 'computers_grand_root',
'removable']) {
for (type in Crostini.VALID_ROOT_TYPES_FOR_SHARE) {
volumeManagerRootType = type;
assertFalse(Crostini.canSharePath(root, true, volumeManager));
assertFalse(Crostini.canSharePath(root, false, volumeManager));
......
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