diff options
author | ericu@google.com <ericu@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-07 19:55:00 +0000 |
---|---|---|
committer | ericu@google.com <ericu@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-07 19:55:00 +0000 |
commit | 368ddad78d3f2eac1ea7a92cfb9716ecd0166279 (patch) | |
tree | 12991a1cf9204760a254dfacd954158035e4d52b /webkit/fileapi/file_system_operation.h | |
parent | c1973bdf0c94687f96155af8249358a4b585e381 (diff) | |
download | chromium_src-368ddad78d3f2eac1ea7a92cfb9716ecd0166279.zip chromium_src-368ddad78d3f2eac1ea7a92cfb9716ecd0166279.tar.gz chromium_src-368ddad78d3f2eac1ea7a92cfb9716ecd0166279.tar.bz2 |
Add the actual writing-files part of FileWriter.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/3476002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61833 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/fileapi/file_system_operation.h')
-rw-r--r-- | webkit/fileapi/file_system_operation.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/webkit/fileapi/file_system_operation.h b/webkit/fileapi/file_system_operation.h index ba65b7d..bfa4141 100644 --- a/webkit/fileapi/file_system_operation.h +++ b/webkit/fileapi/file_system_operation.h @@ -14,16 +14,20 @@ #include "base/ref_counted.h" #include "base/scoped_callback_factory.h" #include "base/scoped_ptr.h" +#include "googleurl/src/gurl.h" namespace base { class Time; } class GURL; +class URLRequest; +class URLRequestContext; namespace fileapi { class FileSystemCallbackDispatcher; +class FileWriterDelegate; // This class is designed to serve one-time file system operation per instance. // Only one method(CreateFile, CreateDirectory, Copy, Move, DirectoryExists, @@ -58,7 +62,9 @@ class FileSystemOperation { void Remove(const FilePath& path, bool recursive); - void Write(const FilePath& path, const GURL& blob_url, int64 offset); + void Write( + scoped_refptr<URLRequestContext> url_request_context, + const FilePath& path, const GURL& blob_url, int64 offset); void Truncate(const FilePath& path, int64 length); @@ -107,10 +113,19 @@ class FileSystemOperation { void DidTouchFile(base::PlatformFileError rv); - scoped_ptr<FileSystemCallbackDispatcher> dispatcher_; + // Helper for Write(). + void OnFileOpenedForWrite( + base::PlatformFileError rv, + base::PassPlatformFile file, + bool created); + scoped_ptr<FileSystemCallbackDispatcher> dispatcher_; base::ScopedCallbackFactory<FileSystemOperation> callback_factory_; + // These are all used only by Write(). + friend class FileWriterDelegate; + scoped_ptr<FileWriterDelegate> file_writer_delegate_; + scoped_ptr<URLRequest> blob_request_; FileSystemOperation* cancel_operation_; #ifndef NDEBUG |