From 55d9bed8de248d583bd5770a42c8520e1225162b Mon Sep 17 00:00:00 2001 From: "zelidrag@chromium.org" Date: Fri, 25 Mar 2011 20:37:59 +0000 Subject: 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 --- webkit/fileapi/file_system_path_manager.h | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'webkit/fileapi/file_system_path_manager.h') 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; // is either one of "Temporary" or "Persistent". class FileSystemPathManager { public: - FileSystemPathManager(scoped_refptr file_message_loop, - const FilePath& profile_path, - bool is_incognito, - bool allow_file_access_from_files); + FileSystemPathManager( + scoped_refptr file_message_loop, + const FilePath& profile_path, + scoped_refptr 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 sandbox_provider_; + scoped_ptr local_provider_; DISALLOW_COPY_AND_ASSIGN(FileSystemPathManager); }; -- cgit v1.1