summaryrefslogtreecommitdiffstats
path: root/webkit/chromeos/fileapi/cros_mount_point_provider.h
diff options
context:
space:
mode:
authorkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-29 07:10:05 +0000
committerkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-29 07:10:05 +0000
commit25b6979911b3fbcc4e6ee95a47db88c4d5a5930f (patch)
treeb60353dc6c32a5571ee865025e10713fb1c1c2f9 /webkit/chromeos/fileapi/cros_mount_point_provider.h
parent3de8e61f52c73ab6435bb96abbacd862ad68c8ac (diff)
downloadchromium_src-25b6979911b3fbcc4e6ee95a47db88c4d5a5930f.zip
chromium_src-25b6979911b3fbcc4e6ee95a47db88c4d5a5930f.tar.gz
chromium_src-25b6979911b3fbcc4e6ee95a47db88c4d5a5930f.tar.bz2
Introduce AsyncFileUtil and deprecate FileSystemFileUtilProxy
In LocalFileSystemOperation we used to use a synchronous implementation (implemented as FileSystemFileUtil) to perform subtasks (e.g. file_util::Copy type operation), but it's not always natural to have synchronous implementation depending on filesystem types. For example async interface works much better if we need to talk to a remote server or a device. This patch introduces an async version of FileUtil, AsyncFileUtil, and replaces FileSystemFileUtil+Proxy implementation with it. After this patch, each filesystem can choose either: - implement synchronous FileSystemFileUtil and use it with AsyncFileUtilAdapter, or - directly implement asynchronous AsyncFileUtil BUG=154835 TEST=existing tests Review URL: https://codereview.chromium.org/12035049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179299 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.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/webkit/chromeos/fileapi/cros_mount_point_provider.h b/webkit/chromeos/fileapi/cros_mount_point_provider.h
index d34c209..f013e6b 100644
--- a/webkit/chromeos/fileapi/cros_mount_point_provider.h
+++ b/webkit/chromeos/fileapi/cros_mount_point_provider.h
@@ -18,11 +18,11 @@
#include "webkit/storage/webkit_storage_export.h"
namespace fileapi {
+class AsyncFileUtilAdapter;
class ExternalMountPoints;
class FileSystemFileUtil;
class FileSystemURL;
class IsolatedContext;
-class LocalFileUtil;
}
namespace chromeos {
@@ -63,6 +63,8 @@ class WEBKIT_STORAGE_EXPORT CrosMountPointProvider
virtual bool IsRestrictedFileName(const FilePath& filename) const OVERRIDE;
virtual fileapi::FileSystemFileUtil* GetFileUtil(
fileapi::FileSystemType type) OVERRIDE;
+ virtual fileapi::AsyncFileUtil* GetAsyncFileUtil(
+ fileapi::FileSystemType type) OVERRIDE;
virtual fileapi::FilePermissionPolicy GetPermissionPolicy(
const fileapi::FileSystemURL& url,
int permissions) const OVERRIDE;
@@ -114,7 +116,7 @@ class WEBKIT_STORAGE_EXPORT CrosMountPointProvider
scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_;
scoped_ptr<FileAccessPermissions> file_access_permissions_;
- scoped_ptr<fileapi::LocalFileUtil> local_file_util_;
+ scoped_ptr<fileapi::AsyncFileUtilAdapter> local_file_util_;
// Mount points specific to the owning context.
//