Commit 7befc98c authored by Joel Hockey's avatar Joel Hockey Committed by Commit Bot

Add file_manager::util::ConvertPathInsideVMToFileSystemURL()

This function will be used for wayland drag and drop when dragging items
from crostini where the path needs to be translated. It is the reverse
of ConvertFileSystemURLToPathInsideVM().

Bug: 1144138
Change-Id: Idb9e2eb1a5323a86f25ae2b08caf1971cfa9191d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2513313
Commit-Queue: Joel Hockey <joelhockey@chromium.org>
Auto-Submit: Joel Hockey <joelhockey@chromium.org>
Reviewed-by: default avatarLuciano Pacheco <lucmult@chromium.org>
Cr-Commit-Position: refs/heads/master@{#823462}
parent 3bbb69a8
...@@ -160,7 +160,7 @@ void FindGuestOsApps( ...@@ -160,7 +160,7 @@ void FindGuestOsApps(
for (const GURL& file_url : file_urls) { for (const GURL& file_url : file_urls) {
if (!file_manager::util::ConvertFileSystemURLToPathInsideVM( if (!file_manager::util::ConvertFileSystemURLToPathInsideVM(
profile, file_system_context->CrackURL(file_url), dummy_vm_mount, profile, file_system_context->CrackURL(file_url), dummy_vm_mount,
&not_used)) { /*map_crostini_home=*/false, &not_used)) {
return; return;
} }
} }
......
...@@ -192,6 +192,14 @@ std::string GetFsUuidForRemovableMedia(const std::string& volume_name) { ...@@ -192,6 +192,14 @@ std::string GetFsUuidForRemovableMedia(const std::string& volume_name) {
return fs_uuid; return fs_uuid;
} }
// Same as parent.AppendRelativePath(child, path) except that it allows
// parent == child, in which case path is unchanged.
bool AppendRelativePath(const base::FilePath& parent,
const base::FilePath& child,
base::FilePath* path) {
return child == parent || parent.AppendRelativePath(child, path);
}
} // namespace } // namespace
const base::FilePath::CharType kRemovableMediaPath[] = const base::FilePath::CharType kRemovableMediaPath[] =
...@@ -288,8 +296,7 @@ bool MigrateFromDownloadsToMyFiles(Profile* profile, ...@@ -288,8 +296,7 @@ bool MigrateFromDownloadsToMyFiles(Profile* profile,
if (new_base == old_base) if (new_base == old_base)
return false; return false;
base::FilePath relative; base::FilePath relative;
if (old_path == old_base || if (AppendRelativePath(old_base, old_path, &relative)) {
old_base.AppendRelativePath(old_path, &relative)) {
*new_path = new_base.Append(relative); *new_path = new_base.Append(relative);
return old_path != *new_path; return old_path != *new_path;
} }
...@@ -365,8 +372,8 @@ bool ConvertFileSystemURLToPathInsideVM( ...@@ -365,8 +372,8 @@ bool ConvertFileSystemURLToPathInsideVM(
Profile* profile, Profile* profile,
const storage::FileSystemURL& file_system_url, const storage::FileSystemURL& file_system_url,
const base::FilePath& vm_mount, const base::FilePath& vm_mount,
base::FilePath* inside, bool map_crostini_home,
bool map_crostini_home) { base::FilePath* inside) {
const std::string& id(file_system_url.mount_filesystem_id()); const std::string& id(file_system_url.mount_filesystem_id());
// File system root requires strip trailing separator. // File system root requires strip trailing separator.
base::FilePath path = base::FilePath path =
...@@ -405,10 +412,12 @@ bool ConvertFileSystemURLToPathInsideVM( ...@@ -405,10 +412,12 @@ bool ConvertFileSystemURLToPathInsideVM(
base_to_exclude = base_to_exclude.Append(kDriveFsDirTeamDrives); base_to_exclude = base_to_exclude.Append(kDriveFsDirTeamDrives);
*inside = inside->Append(kCrostiniMapTeamDrives); *inside = inside->Append(kCrostiniMapTeamDrives);
} }
// Computers -> Computers
} else if (id == chromeos::kSystemMountNameRemovable) { } else if (id == chromeos::kSystemMountNameRemovable) {
// Removable. // Removable.
*inside = vm_mount.Append(chromeos::kSystemMountNameRemovable); *inside = vm_mount.Append(chromeos::kSystemMountNameRemovable);
} else if (id == GetAndroidFilesMountPointName()) { } else if (id == GetAndroidFilesMountPointName()) {
// PlayFiles.
*inside = vm_mount.Append(kCrostiniMapPlayFiles); *inside = vm_mount.Append(kCrostiniMapPlayFiles);
} else if (id == chromeos::kSystemMountNameArchive) { } else if (id == chromeos::kSystemMountNameArchive) {
// Archive. // Archive.
...@@ -427,7 +436,7 @@ bool ConvertFileSystemURLToPathInsideVM( ...@@ -427,7 +436,7 @@ bool ConvertFileSystemURLToPathInsideVM(
*inside = vm_mount.Append(kCrostiniMapLinuxFiles); *inside = vm_mount.Append(kCrostiniMapLinuxFiles);
} }
} else if (file_system_url.type() == storage::kFileSystemTypeSmbFs) { } else if (file_system_url.type() == storage::kFileSystemTypeSmbFs) {
// Do not assume the share is currently accessible via SmbService // SMB. Do not assume the share is currently accessible via SmbService
// as this function is called during unmount when SmbFsShare is // as this function is called during unmount when SmbFsShare is
// destroyed. The only information safely available is the stable // destroyed. The only information safely available is the stable
// mount ID. // mount ID.
...@@ -436,8 +445,7 @@ bool ConvertFileSystemURLToPathInsideVM( ...@@ -436,8 +445,7 @@ bool ConvertFileSystemURLToPathInsideVM(
} else { } else {
return false; return false;
} }
return base_to_exclude == path || return AppendRelativePath(base_to_exclude, path, inside);
base_to_exclude.AppendRelativePath(path, inside);
} }
bool ConvertFileSystemURLToPathInsideCrostini( bool ConvertFileSystemURLToPathInsideCrostini(
...@@ -446,7 +454,106 @@ bool ConvertFileSystemURLToPathInsideCrostini( ...@@ -446,7 +454,106 @@ bool ConvertFileSystemURLToPathInsideCrostini(
base::FilePath* inside) { base::FilePath* inside) {
return ConvertFileSystemURLToPathInsideVM( return ConvertFileSystemURLToPathInsideVM(
profile, file_system_url, crostini::ContainerChromeOSBaseDirectory(), profile, file_system_url, crostini::ContainerChromeOSBaseDirectory(),
inside, /*map_crostini_home=*/true); /*map_crostini_home=*/true, inside);
}
bool ConvertPathInsideVMToFileSystemURL(
Profile* profile,
const base::FilePath& inside,
const base::FilePath& vm_mount,
bool map_crostini_home,
storage::FileSystemURL* file_system_url) {
storage::ExternalMountPoints* mount_points =
storage::ExternalMountPoints::GetSystemInstance();
// Include drive if using DriveFS.
std::string mount_point_name_drive;
auto* integration_service =
drive::DriveIntegrationServiceFactory::FindForProfile(profile);
if (integration_service) {
mount_point_name_drive =
integration_service->GetMountPointPath().BaseName().value();
}
std::string mount_name;
base::FilePath path;
base::FilePath relative_path;
if (map_crostini_home) {
base::Optional<crostini::ContainerInfo> container_info =
crostini::CrostiniManager::GetForProfile(profile)->GetContainerInfo(
crostini::ContainerId::GetDefault());
if (container_info &&
AppendRelativePath(container_info->homedir, inside, &relative_path)) {
*file_system_url = mount_points->CreateExternalFileSystemURL(
url::Origin(), GetCrostiniMountPointName(profile), relative_path);
return file_system_url->is_valid();
}
}
if (!vm_mount.AppendRelativePath(inside, &path)) {
return false;
}
if (AppendRelativePath(base::FilePath(kFolderNameMyFiles), path,
&relative_path)) {
// MyFiles.
mount_name = GetDownloadsMountPointName(profile);
path = relative_path;
} else if (AppendRelativePath(base::FilePath(kCrostiniMapLinuxFiles), path,
&relative_path)) {
// LinuxFiles.
mount_name = GetCrostiniMountPointName(profile);
path = relative_path;
} else if (base::FilePath(kCrostiniMapGoogleDrive)
.AppendRelativePath(path, &relative_path)) {
mount_name = mount_point_name_drive;
path = relative_path;
relative_path.clear();
// GoogleDrive
if (AppendRelativePath(base::FilePath(kCrostiniMapMyDrive), path,
&relative_path)) {
// Special mapping for /GoogleDrive/MyDrive -> root
path = base::FilePath(kDriveFsDirRoot).Append(relative_path);
} else if (AppendRelativePath(base::FilePath(kCrostiniMapTeamDrives), path,
&relative_path)) {
// Special mapping for /GoogleDrive/SharedDrive -> team_drives
path = base::FilePath(kDriveFsDirTeamDrives).Append(relative_path);
}
// Computers -> Computers
} else if (base::FilePath(chromeos::kSystemMountNameRemovable)
.AppendRelativePath(path, &relative_path)) {
// Removable subdirs only.
mount_name = chromeos::kSystemMountNameRemovable;
path = relative_path;
} else if (AppendRelativePath(base::FilePath(kCrostiniMapPlayFiles), path,
&relative_path)) {
// PlayFiles.
mount_name = GetAndroidFilesMountPointName();
path = relative_path;
} else if (base::FilePath(chromeos::kSystemMountNameArchive)
.AppendRelativePath(path, &relative_path)) {
// Archive subdirs only.
mount_name = chromeos::kSystemMountNameArchive;
path = relative_path;
} else if (base::FilePath(kCrostiniMapSmbFs)
.AppendRelativePath(path, &relative_path)) {
// SMB.
std::vector<base::FilePath::StringType> components;
relative_path.GetComponents(&components);
if (components.size() < 1) {
return false;
}
mount_name = components[0];
path.clear();
base::FilePath(mount_name).AppendRelativePath(relative_path, &path);
} else {
return false;
}
*file_system_url = mount_points->CreateExternalFileSystemURL(
url::Origin(), mount_name, path);
return file_system_url->is_valid();
} }
bool ConvertPathToArcUrl(const base::FilePath& path, GURL* arc_url_out) { bool ConvertPathToArcUrl(const base::FilePath& path, GURL* arc_url_out) {
......
...@@ -98,13 +98,18 @@ std::vector<std::string> GetCrostiniMountOptions( ...@@ -98,13 +98,18 @@ std::vector<std::string> GetCrostiniMountOptions(
const std::string& host_private_key, const std::string& host_private_key,
const std::string& container_public_key); const std::string& container_public_key);
// Convert a cracked url to a path inside a VM mounted at |vm_mount|. // Convert a cracked |file_system_url| to a path inside a VM mounted at
// |vm_mount| (e.g. /mnt/chromeos). If |map_crostini_home| is set, paths under
// GetCrostiniMountDirectory() are translated to be under the user's home
// directory (e.g. /home/user) otherwise these paths map to
// |vm_mount|/LinuxFiles. This function is the reverse of
// ConvertPathInsideVMToFileSystemURL(). Returns true iff path can be converted.
bool ConvertFileSystemURLToPathInsideVM( bool ConvertFileSystemURLToPathInsideVM(
Profile* profile, Profile* profile,
const storage::FileSystemURL& file_system_url, const storage::FileSystemURL& file_system_url,
const base::FilePath& vm_mount, const base::FilePath& vm_mount,
base::FilePath* inside, bool map_crostini_home,
bool map_crostini_home = false); base::FilePath* inside);
// Convert a cracked url to a path inside the Crostini VM. // Convert a cracked url to a path inside the Crostini VM.
bool ConvertFileSystemURLToPathInsideCrostini( bool ConvertFileSystemURLToPathInsideCrostini(
...@@ -112,6 +117,18 @@ bool ConvertFileSystemURLToPathInsideCrostini( ...@@ -112,6 +117,18 @@ bool ConvertFileSystemURLToPathInsideCrostini(
const storage::FileSystemURL& file_system_url, const storage::FileSystemURL& file_system_url,
base::FilePath* inside); base::FilePath* inside);
// Convert a path inside a VM mounted at |vm_mount| (e.g. /mnt/chromeos) to a
// FileSystemURL. If |map_crostini_home| is set, paths
// under the user's home directory (e.g. /home/user) are translated to be under
// GetCrostiniMountDirectory(). This function is the reverse of
// ConvertFileSystemURLToPathInsideVM(). Returns true iff path can be converted.
bool ConvertPathInsideVMToFileSystemURL(
Profile* profile,
const base::FilePath& inside,
const base::FilePath& vm_mount,
bool map_crostini_home,
storage::FileSystemURL* file_system_url);
// DEPRECATED. Use |ConvertToContentUrls| instead. // DEPRECATED. Use |ConvertToContentUrls| instead.
// While this function can convert paths under Downloads, /media/removable // While this function can convert paths under Downloads, /media/removable
// and /special/drive, this CANNOT convert paths under ARC media directories // and /special/drive, this CANNOT convert paths under ARC media directories
......
...@@ -318,7 +318,7 @@ TEST_F(FileManagerPathUtilTest, MigrateToDriveFs) { ...@@ -318,7 +318,7 @@ TEST_F(FileManagerPathUtilTest, MigrateToDriveFs) {
result); result);
} }
TEST_F(FileManagerPathUtilTest, ConvertFileSystemURLToPathInsideVM) { TEST_F(FileManagerPathUtilTest, ConvertBetweenFileSystemURLAndPathInsideVM) {
storage::ExternalMountPoints* mount_points = storage::ExternalMountPoints* mount_points =
storage::ExternalMountPoints::GetSystemInstance(); storage::ExternalMountPoints::GetSystemInstance();
// Setup for DriveFS. // Setup for DriveFS.
...@@ -370,30 +370,88 @@ TEST_F(FileManagerPathUtilTest, ConvertFileSystemURLToPathInsideVM) { ...@@ -370,30 +370,88 @@ TEST_F(FileManagerPathUtilTest, ConvertFileSystemURLToPathInsideVM) {
base::FilePath("/media/fuse/smbfs-smbfsmountid")); base::FilePath("/media/fuse/smbfs-smbfsmountid"));
base::FilePath inside; base::FilePath inside;
storage::FileSystemURL url;
base::FilePath vm_mount("/mnt/chromeos"); base::FilePath vm_mount("/mnt/chromeos");
EXPECT_TRUE(ConvertFileSystemURLToPathInsideVM(
profile_.get(),
mount_points->CreateExternalFileSystemURL(
url::Origin(), "Downloads-testing_profile-hash",
base::FilePath("path/in/myfiles")),
vm_mount, &inside));
EXPECT_EQ("/mnt/chromeos/MyFiles/path/in/myfiles", inside.value());
EXPECT_TRUE(ConvertFileSystemURLToPathInsideVM( struct Test {
profile_.get(), std::string mount_name;
mount_points->CreateExternalFileSystemURL( std::string relative_path;
url::Origin(), "crostini_0123456789abcdef_termina_penguin", std::string inside;
base::FilePath("path/in/crostini")), };
vm_mount, &inside));
EXPECT_EQ("/mnt/chromeos/LinuxFiles/path/in/crostini", inside.value()); Test tests[] = {
{
"Downloads-testing_profile-hash",
"path/in/myfiles",
"/mnt/chromeos/MyFiles/path/in/myfiles",
},
{
"crostini_0123456789abcdef_termina_penguin",
"path/in/crostini",
"/mnt/chromeos/LinuxFiles/path/in/crostini",
},
{
"android_files",
"path/in/android",
"/mnt/chromeos/PlayFiles/path/in/android",
},
{
"drivefs-84675c855b63e12f384d45f033826980",
"root/path/in/mydrive",
"/mnt/chromeos/GoogleDrive/MyDrive/path/in/mydrive",
},
{
"drivefs-84675c855b63e12f384d45f033826980",
"team_drives/path/in/teamdrives",
"/mnt/chromeos/GoogleDrive/SharedDrives/path/in/teamdrives",
},
{
"drivefs-84675c855b63e12f384d45f033826980",
"Computers/path/in/computers",
"/mnt/chromeos/GoogleDrive/Computers/path/in/computers",
},
{
"removable",
"MyUSB/path/in/removable",
"/mnt/chromeos/removable/MyUSB/path/in/removable",
},
{
"archive",
"file.rar/path/in/archive",
"/mnt/chromeos/archive/file.rar/path/in/archive",
},
{
"smbfsmountid",
"path/in/smb",
"/mnt/chromeos/SMB/smbfsmountid/path/in/smb",
},
};
for (const auto& test : tests) {
// ConvertFileSystemURLToPathInsideVM.
EXPECT_TRUE(ConvertFileSystemURLToPathInsideVM(
profile_.get(),
mount_points->CreateExternalFileSystemURL(
url::Origin(), test.mount_name, base::FilePath(test.relative_path)),
vm_mount, /*map_crostini_home=*/false, &inside));
EXPECT_EQ(test.inside, inside.value());
// ConvertPathInsideVMToFileSystemURL.
EXPECT_TRUE(ConvertPathInsideVMToFileSystemURL(
profile_.get(), base::FilePath(test.inside), vm_mount,
/*map_crostini_home=*/false, &url));
EXPECT_EQ(test.mount_name, url.filesystem_id());
EXPECT_EQ(test.mount_name + "/" + test.relative_path,
url.virtual_path().value());
}
// Special case for Crostini $HOME. // Special case for Crostini $HOME ConvertFileSystemURLToPathInsideVM.
EXPECT_TRUE(ConvertFileSystemURLToPathInsideVM( EXPECT_TRUE(ConvertFileSystemURLToPathInsideVM(
profile_.get(), profile_.get(),
mount_points->CreateExternalFileSystemURL( mount_points->CreateExternalFileSystemURL(
url::Origin(), "crostini_0123456789abcdef_termina_penguin", url::Origin(), "crostini_0123456789abcdef_termina_penguin",
base::FilePath("path/in/crostini")), base::FilePath("path/in/crostini")),
vm_mount, &inside, /*map_crostini_home=*/true)); vm_mount, /*map_crostini_home=*/true, &inside));
EXPECT_EQ("/home/testuser/path/in/crostini", inside.value()); EXPECT_EQ("/home/testuser/path/in/crostini", inside.value());
EXPECT_TRUE(ConvertFileSystemURLToPathInsideCrostini( EXPECT_TRUE(ConvertFileSystemURLToPathInsideCrostini(
profile_.get(), profile_.get(),
...@@ -407,63 +465,21 @@ TEST_F(FileManagerPathUtilTest, ConvertFileSystemURLToPathInsideVM) { ...@@ -407,63 +465,21 @@ TEST_F(FileManagerPathUtilTest, ConvertFileSystemURLToPathInsideVM) {
profile_.get(), profile_.get(),
mount_points->CreateExternalFileSystemURL( mount_points->CreateExternalFileSystemURL(
url::Origin(), "unknown", base::FilePath("path/in/unknown")), url::Origin(), "unknown", base::FilePath("path/in/unknown")),
vm_mount, &inside)); vm_mount, /*map_crostini_home=*/false, &inside));
EXPECT_TRUE(ConvertFileSystemURLToPathInsideVM( // Special case for Crostini $HOME ConvertPathInsideVMToFileSystemURL.
profile_.get(), EXPECT_TRUE(ConvertPathInsideVMToFileSystemURL(
mount_points->CreateExternalFileSystemURL( profile_.get(), base::FilePath("/home/testuser/path/in/crostini"),
url::Origin(), "android_files", base::FilePath("path/in/android")), vm_mount, /*map_crostini_home=*/true, &url));
vm_mount, &inside)); EXPECT_EQ("crostini_0123456789abcdef_termina_penguin/path/in/crostini",
EXPECT_EQ("/mnt/chromeos/PlayFiles/path/in/android", inside.value()); url.virtual_path().value());
EXPECT_FALSE(ConvertPathInsideVMToFileSystemURL(
EXPECT_TRUE(ConvertFileSystemURLToPathInsideVM( profile_.get(), base::FilePath("/home/testuser/path/in/crostini"),
profile_.get(), vm_mount, /*map_crostini_home=*/false, &url));
mount_points->CreateExternalFileSystemURL(
url::Origin(), "drivefs-84675c855b63e12f384d45f033826980", EXPECT_FALSE(ConvertPathInsideVMToFileSystemURL(
base::FilePath("root/path/in/mydrive")), profile_.get(), base::FilePath("/path/not/under/mount"), vm_mount,
vm_mount, &inside)); /*map_crostini_home=*/false, &url));
EXPECT_EQ("/mnt/chromeos/GoogleDrive/MyDrive/path/in/mydrive",
inside.value());
EXPECT_TRUE(ConvertFileSystemURLToPathInsideVM(
profile_.get(),
mount_points->CreateExternalFileSystemURL(
url::Origin(), "drivefs-84675c855b63e12f384d45f033826980",
base::FilePath("team_drives/path/in/teamdrives")),
vm_mount, &inside));
EXPECT_EQ("/mnt/chromeos/GoogleDrive/SharedDrives/path/in/teamdrives",
inside.value());
EXPECT_TRUE(ConvertFileSystemURLToPathInsideVM(
profile_.get(),
mount_points->CreateExternalFileSystemURL(
url::Origin(), "drivefs-84675c855b63e12f384d45f033826980",
base::FilePath("Computers/path/in/computers")),
vm_mount, &inside));
EXPECT_EQ("/mnt/chromeos/GoogleDrive/Computers/path/in/computers",
inside.value());
EXPECT_TRUE(ConvertFileSystemURLToPathInsideVM(
profile_.get(),
mount_points->CreateExternalFileSystemURL(
url::Origin(), "removable",
base::FilePath("MyUSB/path/in/removable")),
vm_mount, &inside));
EXPECT_EQ("/mnt/chromeos/removable/MyUSB/path/in/removable", inside.value());
EXPECT_TRUE(ConvertFileSystemURLToPathInsideVM(
profile_.get(),
mount_points->CreateExternalFileSystemURL(
url::Origin(), "archive", base::FilePath("file.rar/path/in/archive")),
vm_mount, &inside));
EXPECT_EQ("/mnt/chromeos/archive/file.rar/path/in/archive", inside.value());
EXPECT_TRUE(ConvertFileSystemURLToPathInsideVM(
profile_.get(),
mount_points->CreateExternalFileSystemURL(
url::Origin(), "smbfsmountid", base::FilePath("path/in/smb/share")),
vm_mount, &inside));
EXPECT_EQ("/mnt/chromeos/SMB/smbfsmountid/path/in/smb/share", inside.value());
} }
TEST_F(FileManagerPathUtilTest, ExtractMountNameFileSystemNameFullPath) { TEST_F(FileManagerPathUtilTest, ExtractMountNameFileSystemNameFullPath) {
......
...@@ -431,8 +431,9 @@ void GuestOsSharePath::CallSeneschalUnsharePath(const std::string& vm_name, ...@@ -431,8 +431,9 @@ void GuestOsSharePath::CallSeneschalUnsharePath(const std::string& vm_name,
storage::FileSystemURL url = mount_points->CreateCrackedFileSystemURL( storage::FileSystemURL url = mount_points->CreateCrackedFileSystemURL(
url::Origin(), storage::kFileSystemTypeExternal, virtual_path); url::Origin(), storage::kFileSystemTypeExternal, virtual_path);
result = file_manager::util::ConvertFileSystemURLToPathInsideVM( result = file_manager::util::ConvertFileSystemURLToPathInsideVM(
profile_, url, dummy_vm_mount, &inside, profile_, url, dummy_vm_mount,
/*map_crostini_home=*/vm_name == crostini::kCrostiniDefaultVmName); /*map_crostini_home=*/vm_name == crostini::kCrostiniDefaultVmName,
&inside);
} }
base::FilePath unshare_path; base::FilePath unshare_path;
if (!result || !dummy_vm_mount.AppendRelativePath(inside, &unshare_path)) { if (!result || !dummy_vm_mount.AppendRelativePath(inside, &unshare_path)) {
......
...@@ -180,8 +180,9 @@ void LaunchPluginVmApp(Profile* profile, ...@@ -180,8 +180,9 @@ void LaunchPluginVmApp(Profile* profile,
// Validate paths in MyFiles/PvmDefault, or are already shared, and convert. // Validate paths in MyFiles/PvmDefault, or are already shared, and convert.
bool shared = GetDefaultSharedDir(profile).IsParent(url.path()) || bool shared = GetDefaultSharedDir(profile).IsParent(url.path()) ||
share_path->IsPathShared(kPluginVmName, url.path()); share_path->IsPathShared(kPluginVmName, url.path());
if (!shared || !file_manager::util::ConvertFileSystemURLToPathInsideVM( if (!shared ||
profile, url, vm_mount, &file_path)) { !file_manager::util::ConvertFileSystemURLToPathInsideVM(
profile, url, vm_mount, /*map_crostini_home=*/false, &file_path)) {
return std::move(callback).Run( return std::move(callback).Run(
file_manager::util::GetMyFilesFolderForProfile(profile).IsParent( file_manager::util::GetMyFilesFolderForProfile(profile).IsParent(
url.path()) url.path())
......
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