diff options
author | zelidrag@chromium.org <zelidrag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-25 20:37:59 +0000 |
---|---|---|
committer | zelidrag@chromium.org <zelidrag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-25 20:37:59 +0000 |
commit | 55d9bed8de248d583bd5770a42c8520e1225162b (patch) | |
tree | 6be27d9ee263e9a475385120a933bcb29fe75a74 /webkit/fileapi/file_system_path_manager.h | |
parent | e69b903ec57dc0f511598b03d4aae148a56e33bc (diff) | |
download | chromium_src-55d9bed8de248d583bd5770a42c8520e1225162b.zip chromium_src-55d9bed8de248d583bd5770a42c8520e1225162b.tar.gz chromium_src-55d9bed8de248d583bd5770a42c8520e1225162b.tar.bz2 |
Wired local file system support for File API. The local file system provider currently exists for ChromeOS builds only.
This CL exposes new extension permission 'fileSystem' that controls access to individual local file system elements from 3rd party extensions. Another new permission 'fileBrowserPrivate' controls access to following API call that retrieves root DOMFileSystem instance for locally exposed folders:
chrome.fileBrowserPrivate.requestLocalFileSystem(callback)
BUG=chromium-os:11983
TEST=ExtensionApiTest.LocalFileSystem
Review URL: http://codereview.chromium.org/6519040
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79451 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/fileapi/file_system_path_manager.h')
-rw-r--r-- | webkit/fileapi/file_system_path_manager.h | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/webkit/fileapi/file_system_path_manager.h b/webkit/fileapi/file_system_path_manager.h index c1d2df9..5a9613a 100644 --- a/webkit/fileapi/file_system_path_manager.h +++ b/webkit/fileapi/file_system_path_manager.h @@ -10,6 +10,7 @@ #include "base/file_path.h" #include "base/file_util.h" #include "webkit/fileapi/file_system_types.h" +#include "webkit/quota/special_storage_policy.h" class GURL; @@ -19,6 +20,7 @@ class MessageLoopProxy; namespace fileapi { +class FileSystemMountPointProvider; class SandboxMountPointProvider; // TODO(kinuko): Probably this module must be called FileSystemPathUtil @@ -32,10 +34,12 @@ class SandboxMountPointProvider; // <type> is either one of "Temporary" or "Persistent". class FileSystemPathManager { public: - FileSystemPathManager(scoped_refptr<base::MessageLoopProxy> file_message_loop, - const FilePath& profile_path, - bool is_incognito, - bool allow_file_access_from_files); + FileSystemPathManager( + scoped_refptr<base::MessageLoopProxy> file_message_loop, + const FilePath& profile_path, + scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy, + bool is_incognito, + bool allow_file_access_from_files); ~FileSystemPathManager(); // Callback for GetFileSystemRootPath. @@ -59,9 +63,11 @@ class FileSystemPathManager { // Like GetFileSystemRootPath, but synchronous, and can be called only while // running on the file thread. - virtual FilePath GetFileSystemRootPathOnFileThread(const GURL& origin_url, - FileSystemType type, - bool create); + virtual FilePath GetFileSystemRootPathOnFileThread( + const GURL& origin_url, + FileSystemType type, + const FilePath& virtual_path, + bool create); // Cracks the given |path|, retrieves the information embedded in the path // and populates |origin_url|, |type| and |virtual_path|. The |virtual_path| // is a sandboxed path in the file system, i.e. the relative path to the @@ -95,6 +101,7 @@ class FileSystemPathManager { const bool is_incognito_; const bool allow_file_access_from_files_; scoped_ptr<SandboxMountPointProvider> sandbox_provider_; + scoped_ptr<FileSystemMountPointProvider> local_provider_; DISALLOW_COPY_AND_ASSIGN(FileSystemPathManager); }; |