Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1316)

Unified Diff: webkit/fileapi/file_system_operation.h

Issue 9016020: Cleanup FileSystemOperation for preparing for adding FSO-factory method (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webkit/fileapi/file_system_operation.h
diff --git a/webkit/fileapi/file_system_operation.h b/webkit/fileapi/file_system_operation.h
index 3126bc48254f93a607a8dec8b0e8de94c7f93f57..6bfd0250503b9e6f53adb273ae3552ab390866dc 100644
--- a/webkit/fileapi/file_system_operation.h
+++ b/webkit/fileapi/file_system_operation.h
@@ -43,16 +43,12 @@ class FileSystemOperationTest;
// FileSystemOperation implementation for local file systems.
class FileSystemOperation : public FileSystemOperationInterface {
public:
- // |dispatcher| will be owned by this class.
- FileSystemOperation(FileSystemCallbackDispatcher* dispatcher,
+ FileSystemOperation(scoped_ptr<FileSystemCallbackDispatcher> dispatcher,
scoped_refptr<base::MessageLoopProxy> proxy,
FileSystemContext* file_system_context);
virtual ~FileSystemOperation();
// FileSystemOperation overrides.
- virtual void OpenFileSystem(const GURL& origin_url,
- fileapi::FileSystemType type,
- bool create) OVERRIDE;
virtual void CreateFile(const GURL& path,
bool exclusive) OVERRIDE;
virtual void CreateDirectory(const GURL& path,
@@ -79,15 +75,12 @@ class FileSystemOperation : public FileSystemOperationInterface {
const GURL& path,
int file_flags,
base::ProcessHandle peer_handle) OVERRIDE;
+ virtual void Cancel(
+ scoped_ptr<FileSystemCallbackDispatcher> cancel_dispatcher) OVERRIDE;
// Synchronously gets the platform path for the given |path|.
void SyncGetPlatformPath(const GURL& path, FilePath* platform_path);
- // Try to cancel the current operation [we support cancelling write or
- // truncate only]. Report failure for the current operation, then tell the
- // passed-in operation to report success.
- void Cancel(FileSystemOperation* cancel_operation);
-
private:
class ScopedQuotaUtilHelper;
@@ -136,11 +129,6 @@ class FileSystemOperation : public FileSystemOperationInterface {
quota::QuotaStatusCode status,
int64 usage, int64 quota);
- // A callback used for OpenFileSystem.
- void DidGetRootPath(bool success,
- const FilePath& path,
- const std::string& name);
-
// Callback for CreateFile for |exclusive|=true cases.
void DidEnsureFileExistsExclusive(base::PlatformFileError rv,
bool created);
@@ -234,7 +222,6 @@ class FileSystemOperation : public FileSystemOperationInterface {
#ifndef NDEBUG
enum OperationType {
kOperationNone,
- kOperationOpenFileSystem,
kOperationCreateFile,
kOperationCreateDirectory,
kOperationCopy,
@@ -270,7 +257,7 @@ class FileSystemOperation : public FileSystemOperationInterface {
friend class FileWriterDelegate;
scoped_ptr<FileWriterDelegate> file_writer_delegate_;
scoped_ptr<net::URLRequest> blob_request_;
- scoped_ptr<FileSystemOperation> cancel_operation_;
+ scoped_ptr<FileSystemCallbackDispatcher> cancel_dispatcher_;
// Used only by OpenFile, in order to clone the file handle back to the
// requesting process.
« no previous file with comments | « webkit/fileapi/file_system_mount_point_provider_unittest.cc ('k') | webkit/fileapi/file_system_operation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698