summaryrefslogtreecommitdiffstats
path: root/webkit/fileapi/file_system_context.h
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/fileapi/file_system_context.h')
-rw-r--r--webkit/fileapi/file_system_context.h30
1 files changed, 26 insertions, 4 deletions
diff --git a/webkit/fileapi/file_system_context.h b/webkit/fileapi/file_system_context.h
index 55e79a3..c5db158 100644
--- a/webkit/fileapi/file_system_context.h
+++ b/webkit/fileapi/file_system_context.h
@@ -27,11 +27,13 @@ class SpecialStoragePolicy;
}
namespace webkit_blob {
+class BlobURLRequestJobTest;
class FileStreamReader;
}
namespace fileapi {
+class AsyncFileUtil;
class ExternalFileSystemMountPointProvider;
class ExternalMountPoints;
class FileSystemFileUtil;
@@ -87,10 +89,8 @@ class WEBKIT_STORAGE_EXPORT FileSystemContext
// it is not a quota-managed storage.
FileSystemQuotaUtil* GetQuotaUtil(FileSystemType type) const;
- // Returns the appropriate FileUtil instance for the given |type|.
- // This may return NULL if it is given an invalid or unsupported filesystem
- // type.
- FileSystemFileUtil* GetFileUtil(FileSystemType type) const;
+ // Returns the appropriate AsyncFileUtil instance for the given |type|.
+ AsyncFileUtil* GetAsyncFileUtil(FileSystemType type) const;
// Returns the mount point provider instance for the given |type|.
// This may return NULL if it is given an invalid or unsupported filesystem
@@ -197,6 +197,23 @@ class WEBKIT_STORAGE_EXPORT FileSystemContext
const FilePath& path) const;
private:
+ // Friended for GetFileUtil.
+ // These classes know the target filesystem (i.e. sandbox filesystem)
+ // supports synchronous FileUtil.
+ friend class LocalFileSystemOperation;
+ friend class LocalFileChangeTracker;
+ friend class LocalFileSyncContext;
+
+ // Friended for GetFileUtil.
+ // Test classes that rely on synchronous FileUtils.
+ friend class webkit_blob::BlobURLRequestJobTest;
+ friend class FileSystemQuotaClientTest;
+ friend class LocalFileSystemTestOriginHelper;
+ friend class NativeMediaFileUtilTest;
+ friend class FileSystemURLRequestJobTest;
+ friend class UploadFileSystemFileElementReaderTest;
+
+ // Deleters.
friend struct DefaultContextDeleter;
friend class base::DeleteHelper<FileSystemContext>;
friend class base::RefCountedThreadSafe<FileSystemContext,
@@ -214,6 +231,11 @@ class WEBKIT_STORAGE_EXPORT FileSystemContext
// returns the original url, without attempting to crack it.
FileSystemURL CrackFileSystemURL(const FileSystemURL& url) const;
+ // Returns the appropriate FileUtil instance for the given |type|.
+ // This may return NULL if it is given an invalid type or the filesystem
+ // does not support synchronous file operations.
+ FileSystemFileUtil* GetFileUtil(FileSystemType type) const;
+
scoped_ptr<FileSystemTaskRunners> task_runners_;
scoped_refptr<quota::QuotaManagerProxy> quota_manager_proxy_;