Use a generic approach to support non-native file handles on ChromeOS WebUI
Currently, when opening files from the ChromeOS file manager, users see an error trying if the file is from an MTP device or an ARC++ "document provider" mount under the media virtual folder (e.g. "Pictures"). See https://crbug.com/895479 for details about document provider. An approach added in r778183 was to check for a "/provided" path prefix, but this only works for some non-native filesystem types on ChromeOS. Generalise it by asking storage::ExternalMountPoints to lookup the "virtual" path, which contains the path components necessary to extract the filesystem type. Use remains restricted to chrome:// WebUIs on ChromeOS. The code is still covered by tests added in r778183 (i.e. SystemWebAppManagerLaunchDirectoryFileSystemProviderBrowserTest.*). https://crbug.com/1102287 tracks making testing of android volumes possible outside of the files app. Bug: 1099474 Change-Id: I37a0239dec4d9b7c6bba866302db00b5d84941b3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2279413Reviewed-by:Marijn Kruisselbrink <mek@chromium.org> Commit-Queue: Trent Apted <tapted@chromium.org> Cr-Commit-Position: refs/heads/master@{#786161}
Showing
Please register or sign in to comment