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

Unified Diff: webkit/fileapi/file_system_context.h

Issue 9372044: Refactor FileSystemOperation to take callback for each method. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reflected kinuko's comments + Fixture for failing-Write -> Cancel pattern. Created 8 years, 10 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
« no previous file with comments | « webkit/chromeos/fileapi/cros_mount_point_provider.cc ('k') | webkit/fileapi/file_system_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/file_system_context.h
diff --git a/webkit/fileapi/file_system_context.h b/webkit/fileapi/file_system_context.h
index d57b2e337f0e3010781455645199f0e9e853c947..2a6b211701a915a586cf91db685fd82daddbec09 100644
--- a/webkit/fileapi/file_system_context.h
+++ b/webkit/fileapi/file_system_context.h
@@ -5,6 +5,7 @@
#ifndef WEBKIT_FILEAPI_FILE_SYSTEM_CONTEXT_H_
#define WEBKIT_FILEAPI_FILE_SYSTEM_CONTEXT_H_
+#include "base/callback.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/platform_file.h"
@@ -25,8 +26,6 @@ class QuotaManagerProxy;
namespace fileapi {
class ExternalFileSystemMountPointProvider;
-class FileSystemCallbackDispatcher;
-class FileSystemContext;
class FileSystemFileUtil;
class FileSystemMountPointProvider;
class FileSystemOperationInterface;
@@ -87,17 +86,21 @@ class FileSystemContext
// calling GetMountPointProvider(kFileSystemTypeExternal).
ExternalFileSystemMountPointProvider* external_provider() const;
+ // Used for OpenFileSystem.
+ typedef base::Callback<void(base::PlatformFileError result,
+ const std::string& name,
+ const GURL& root)> OpenFileSystemCallback;
+
// Opens the filesystem for the given |origin_url| and |type|, and dispatches
// the DidOpenFileSystem callback of the given |dispatcher|.
// If |create| is true this may actually set up a filesystem instance
// (e.g. by creating the root directory or initializing the database
// entry etc).
- // TODO(kinuko): replace the dispatcher with a regular callback.
void OpenFileSystem(
const GURL& origin_url,
FileSystemType type,
bool create,
- scoped_ptr<FileSystemCallbackDispatcher> dispatcher);
+ OpenFileSystemCallback callback);
// Creates a new FileSystemOperation instance by cracking
// the given filesystem URL |url| to get an appropriate MountPointProvider
@@ -106,7 +109,6 @@ class FileSystemContext
// depending on the filesystem type pointed by the |url|.
FileSystemOperationInterface* CreateFileSystemOperation(
const GURL& url,
- scoped_ptr<FileSystemCallbackDispatcher> dispatcher,
base::MessageLoopProxy* file_proxy);
private:
« no previous file with comments | « webkit/chromeos/fileapi/cros_mount_point_provider.cc ('k') | webkit/fileapi/file_system_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698