diff options
author | dumi@chromium.org <dumi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-22 03:29:14 +0000 |
---|---|---|
committer | dumi@chromium.org <dumi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-22 03:29:14 +0000 |
commit | 5746640f419fe2b493ed4e97aa473e96f73c8d73 (patch) | |
tree | 63b222962eb9c5ea5d230d8add24fe72e6281386 /webkit/fileapi/file_system_operation.h | |
parent | ae236193f7b64659caf81ba2a009f8ff4e947693 (diff) | |
download | chromium_src-5746640f419fe2b493ed4e97aa473e96f73c8d73.zip chromium_src-5746640f419fe2b493ed4e97aa473e96f73c8d73.tar.gz chromium_src-5746640f419fe2b493ed4e97aa473e96f73c8d73.tar.bz2 |
Refactor some file_system classes to use chromium types instead of
WebKit API types.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/3406008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60152 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/fileapi/file_system_operation.h')
-rw-r--r-- | webkit/fileapi/file_system_operation.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/webkit/fileapi/file_system_operation.h b/webkit/fileapi/file_system_operation.h index 9e0fed9..5df4d4d 100644 --- a/webkit/fileapi/file_system_operation.h +++ b/webkit/fileapi/file_system_operation.h @@ -13,10 +13,11 @@ #include "base/platform_file.h" #include "base/ref_counted.h" #include "base/scoped_callback_factory.h" +#include "base/scoped_ptr.h" namespace fileapi { -class FileSystemOperationClient; +class FileSystemCallbackDispatcher; // This class is designed to serve one-time file system operation per instance. // Only one method(CreateFile, CreateDirectory, Copy, Move, DirectoryExists, @@ -24,15 +25,16 @@ class FileSystemOperationClient; // this object and it should be called no more than once. class FileSystemOperation { public: - FileSystemOperation( - FileSystemOperationClient* client, - scoped_refptr<base::MessageLoopProxy> proxy); + FileSystemOperation(FileSystemCallbackDispatcher* dispatcher, + scoped_refptr<base::MessageLoopProxy> proxy); + ~FileSystemOperation(); void CreateFile(const FilePath& path, bool exclusive); void CreateDirectory(const FilePath& path, - bool exclusive); + bool exclusive, + bool recursive); void Copy(const FilePath& src_path, const FilePath& dest_path); @@ -82,13 +84,14 @@ class FileSystemOperation { base::PlatformFileError rv, const std::vector<base::file_util_proxy::Entry>& entries); - // Not owned. - FileSystemOperationClient* client_; + scoped_ptr<FileSystemCallbackDispatcher> dispatcher_; base::ScopedCallbackFactory<FileSystemOperation> callback_factory_; +#ifndef NDEBUG // A flag to make sure we call operation only once per instance. bool operation_pending_; +#endif DISALLOW_COPY_AND_ASSIGN(FileSystemOperation); }; @@ -96,4 +99,3 @@ class FileSystemOperation { } // namespace fileapi #endif // WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_ - |