diff options
author | kerz@chromium.org <kerz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-20 22:19:17 +0000 |
---|---|---|
committer | kerz@chromium.org <kerz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-20 22:19:17 +0000 |
commit | eeed85c4662942e0c9e557d36fa0d26a938058e5 (patch) | |
tree | 3e6e267779cd0de15b1dfb8543e399023a4b1342 /webkit/chromeos/fileapi/cros_mount_point_provider.h | |
parent | fe2534f1d0294dadd3bc915982ef378906a2be57 (diff) | |
download | chromium_src-eeed85c4662942e0c9e557d36fa0d26a938058e5.zip chromium_src-eeed85c4662942e0c9e557d36fa0d26a938058e5.tar.gz chromium_src-eeed85c4662942e0c9e557d36fa0d26a938058e5.tar.bz2 |
Merge 82266 - Fixed file/directory url resolution for external mount point provider.Per Eric's request, refactored FileSystemDirURLRequestJob and FileSystemURLRequestJob classes to resolve local file system through a new operation.BUG=chromium-os:14225TEST=added new test cases to FileSystemPathManagerTest.*, added FileSystemOperationTest.TestGetLocalFilePathSuccessReview URL: http://codereview.chromium.org/6864040
TBR=zelidrag@chromium.org
Review URL: http://codereview.chromium.org/6882102
git-svn-id: svn://svn.chromium.org/chrome/branches/742/src@82372 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/chromeos/fileapi/cros_mount_point_provider.h')
-rw-r--r-- | webkit/chromeos/fileapi/cros_mount_point_provider.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/webkit/chromeos/fileapi/cros_mount_point_provider.h b/webkit/chromeos/fileapi/cros_mount_point_provider.h index 23af15f..7c48df4 100644 --- a/webkit/chromeos/fileapi/cros_mount_point_provider.h +++ b/webkit/chromeos/fileapi/cros_mount_point_provider.h @@ -10,6 +10,7 @@ #include <vector> #include "base/file_path.h" +#include "base/synchronization/lock.h" #include "webkit/fileapi/file_system_mount_point_provider.h" #include "webkit/quota/special_storage_policy.h" @@ -29,12 +30,12 @@ class CrosMountPointProvider virtual bool IsAccessAllowed(const GURL& origin_url, fileapi::FileSystemType type, const FilePath& virtual_path) OVERRIDE; - virtual void GetFileSystemRootPath( + virtual void ValidateFileSystemRootAndGetURL( const GURL& origin_url, fileapi::FileSystemType type, bool create, fileapi::FileSystemPathManager::GetRootPathCallback* callback) OVERRIDE; - virtual FilePath GetFileSystemRootPathOnFileThread( + virtual FilePath ValidateFileSystemRootAndGetPathOnFileThread( const GURL& origin_url, fileapi::FileSystemType type, const FilePath& virtual_path, @@ -47,12 +48,20 @@ class CrosMountPointProvider const std::string& extension_id) OVERRIDE; virtual void GrantFileAccessToExtension( const std::string& extension_id, const FilePath& virtual_path) OVERRIDE; - void RevokeAccessForExtension(const std::string& extension_id) OVERRIDE; + virtual void RevokeAccessForExtension( + const std::string& extension_id) OVERRIDE; + virtual void AddMountPoint(FilePath mount_point) OVERRIDE; + virtual void RemoveMountPoint(FilePath mount_point) OVERRIDE; private: class GetFileSystemRootPathTask; typedef std::map<std::string, FilePath> MountPointMap; + // Gives the real file system's |root_path| for given |virtual_path|. Returns + // false when |virtual_path| cannot be mapped to the real file system. + bool GetRootForVirtualPath(const FilePath& virtual_path, FilePath* root_path); + + base::Lock lock_; // Synchronize all access to path_map_. MountPointMap mount_point_map_; scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_; scoped_ptr<FileAccessPermissions> file_access_permissions_; |