summaryrefslogtreecommitdiffstats
path: root/webkit/chromeos/fileapi/cros_mount_point_provider.cc
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/chromeos/fileapi/cros_mount_point_provider.cc')
-rw-r--r--webkit/chromeos/fileapi/cros_mount_point_provider.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/webkit/chromeos/fileapi/cros_mount_point_provider.cc b/webkit/chromeos/fileapi/cros_mount_point_provider.cc
index b5d40ae..74df6d8 100644
--- a/webkit/chromeos/fileapi/cros_mount_point_provider.cc
+++ b/webkit/chromeos/fileapi/cros_mount_point_provider.cc
@@ -173,5 +173,19 @@ std::vector<FilePath> CrosMountPointProvider::GetRootDirectories() const {
return root_dirs;
}
+bool CrosMountPointProvider::GetVirtualPath(const FilePath& filesystem_path,
+ FilePath* virtual_path) {
+ for (MountPointMap::const_iterator iter = mount_point_map_.begin();
+ iter != mount_point_map_.end();
+ ++iter) {
+ FilePath mount_prefix = iter->second.Append(iter->first);
+ *virtual_path = FilePath(iter->first);
+ if (mount_prefix.AppendRelativePath(filesystem_path, virtual_path)) {
+ return true;
+ }
+ }
+ return false;
+}
+
} // namespace chromeos