summaryrefslogtreecommitdiffstats
path: root/webkit/fileapi/file_system_operation.h
diff options
context:
space:
mode:
authorericu@google.com <ericu@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-07 23:24:38 +0000
committerericu@google.com <ericu@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-07 23:24:38 +0000
commitbd1523876a769c375e0a40b8cfe8c999f40e6e99 (patch)
tree2a2f91b4feee685386936f897f84a41d99d8e721 /webkit/fileapi/file_system_operation.h
parente7dd6d8bb28270d49684714aa03f8162ab558bc6 (diff)
downloadchromium_src-bd1523876a769c375e0a40b8cfe8c999f40e6e99.zip
chromium_src-bd1523876a769c375e0a40b8cfe8c999f40e6e99.tar.gz
chromium_src-bd1523876a769c375e0a40b8cfe8c999f40e6e99.tar.bz2
Resubmit of http://codereview.chromium.org/3476002/show but without the crashing bug.
BUG=none TEST=none Review URL: http://codereview.chromium.org/3618016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61879 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/fileapi/file_system_operation.h')
-rw-r--r--webkit/fileapi/file_system_operation.h19
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