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

Unified Diff: content/browser/file_system/file_system_dispatcher_host.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
Index: content/browser/file_system/file_system_dispatcher_host.h
diff --git a/content/browser/file_system/file_system_dispatcher_host.h b/content/browser/file_system/file_system_dispatcher_host.h
index ebce21452676d74d07ed398d8b8ce3d3ad0d08c0..6660f33dc27dde454c94e2ac5f5fcecf914dcd9b 100644
--- a/content/browser/file_system/file_system_dispatcher_host.h
+++ b/content/browser/file_system/file_system_dispatcher_host.h
@@ -8,7 +8,9 @@
#include <set>
#include "base/basictypes.h"
+#include "base/file_util_proxy.h"
#include "base/id_map.h"
+#include "base/platform_file.h"
#include "content/public/browser/browser_message_filter.h"
#include "webkit/fileapi/file_system_types.h"
@@ -88,6 +90,30 @@ class FileSystemDispatcherHost : public content::BrowserMessageFilter {
void OnSyncGetPlatformPath(const GURL& path,
FilePath* platform_path);
+ // Callback functions to be used when each file operation is finished.
+ void DidFinish(int request_id, base::PlatformFileError result);
+ void DidCancel(int request_id, base::PlatformFileError result);
+ void DidGetMetadata(int request_id,
+ base::PlatformFileError result,
+ const base::PlatformFileInfo& info,
+ const FilePath& platform_path);
+ void DidReadDirectory(int request_id,
+ base::PlatformFileError result,
+ const std::vector<base::FileUtilProxy::Entry>& entries,
+ bool has_more);
+ void DidOpenFile(int request_id,
+ base::PlatformFileError result,
+ base::PlatformFile file,
+ base::ProcessHandle peer_handle);
+ void DidWrite(int request_id,
+ base::PlatformFileError result,
+ int64 bytes,
+ bool complete);
+ void DidOpenFileSystem(int request_id,
+ base::PlatformFileError result,
+ const std::string& name,
+ const GURL& root);
+
// Creates a new FileSystemOperationInterface based on |target_path|.
fileapi::FileSystemOperationInterface* GetNewOperation(
const GURL& target_path,

Powered by Google App Engine
This is Rietveld 408576698