| Index: webkit/fileapi/external_mount_points.cc
|
| diff --git a/webkit/fileapi/external_mount_points.cc b/webkit/fileapi/external_mount_points.cc
|
| index 58a8883acf53fb1348434519186a3d1d81c5a9c6..26db13850c1c1fe7a2a22a40371e92fbc3990bb6 100644
|
| --- a/webkit/fileapi/external_mount_points.cc
|
| +++ b/webkit/fileapi/external_mount_points.cc
|
| @@ -225,6 +225,24 @@ FileSystemURL ExternalMountPoints::CreateCrackedFileSystemURL(
|
| mount_name, cracked_type, cracked_path);
|
| }
|
|
|
| +bool ExternalMountPoints::GetVirtualPath(const base::FilePath& full_path,
|
| + base::FilePath* virtual_path) const {
|
| + DCHECK(virtual_path);
|
| +
|
| + base::AutoLock locker(lock_);
|
| +
|
| + base::FilePath path = NormalizeFilePath(full_path);
|
| + std::map<base::FilePath, std::string>::const_reverse_iterator iter(
|
| + path_to_name_map_.upper_bound(path));
|
| + if (iter == path_to_name_map_.rend())
|
| + return false;
|
| +
|
| + *virtual_path = CreateVirtualRootPath(iter->second);
|
| + if (iter->first == path)
|
| + return true;
|
| + return iter->first.AppendRelativePath(path, virtual_path);
|
| +}
|
| +
|
| RemoteFileSystemProxyInterface* ExternalMountPoints::GetRemoteFileSystemProxy(
|
| const std::string& mount_name) const {
|
| base::AutoLock locker(lock_);
|
| @@ -244,24 +262,6 @@ void ExternalMountPoints::AddMountPointInfosTo(
|
| }
|
| }
|
|
|
| -bool ExternalMountPoints::GetVirtualPath(const base::FilePath& path_in,
|
| - base::FilePath* virtual_path) {
|
| - DCHECK(virtual_path);
|
| -
|
| - base::AutoLock locker(lock_);
|
| -
|
| - base::FilePath path = NormalizeFilePath(path_in);
|
| - std::map<base::FilePath, std::string>::reverse_iterator iter(
|
| - path_to_name_map_.upper_bound(path));
|
| - if (iter == path_to_name_map_.rend())
|
| - return false;
|
| -
|
| - *virtual_path = CreateVirtualRootPath(iter->second);
|
| - if (iter->first == path)
|
| - return true;
|
| - return iter->first.AppendRelativePath(path, virtual_path);
|
| -}
|
| -
|
| base::FilePath ExternalMountPoints::CreateVirtualRootPath(
|
| const std::string& mount_name) const {
|
| return base::FilePath().AppendASCII(mount_name);
|
|
|