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

Unified Diff: webkit/browser/fileapi/file_system_backend.h

Issue 19632004: FileAPI: Add Initialize() function to FileSystemBackend (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove const qualifier Created 7 years, 5 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/browser/fileapi/file_system_backend.h
diff --git a/webkit/browser/fileapi/file_system_backend.h b/webkit/browser/fileapi/file_system_backend.h
index 37cb6b066b894b7a39930b4117f0e6d1335c3d7e..33b4627b1bfec9e4e80a87679829a30ea012a3e7 100644
--- a/webkit/browser/fileapi/file_system_backend.h
+++ b/webkit/browser/fileapi/file_system_backend.h
@@ -46,25 +46,29 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemBackend {
typedef base::Callback<void(const GURL& root_url,
const std::string& name,
base::PlatformFileError error)>
- InitializeFileSystemCallback;
+ OpenFileSystemCallback;
virtual ~FileSystemBackend() {}
// Returns true if this mount point provider can handle |type|.
// One mount point provider may be able to handle multiple filesystem types.
virtual bool CanHandleType(FileSystemType type) const = 0;
- // Initializes the filesystem for the given |origin_url| and |type|.
+ // This method is called right after the backend is registered in the
+ // FileSystemContext and before any other methods are called. Each backend can
+ // do additional initialization which depends on FileSystemContext here.
+ virtual void Initialize(FileSystemContext* context) = 0;
+
+ // Opens the filesystem for the given |origin_url| and |type|.
// This verifies if it is allowed to request (or create) the filesystem
// and if it can access (or create) the root directory of the mount point.
// If |mode| is CREATE_IF_NONEXISTENT calling this may also create
// the root directory (and/or related database entries etc) for
// the filesystem if it doesn't exist.
- virtual void InitializeFileSystem(
+ virtual void OpenFileSystem(
const GURL& origin_url,
FileSystemType type,
OpenFileSystemMode mode,
- FileSystemContext* context,
- const InitializeFileSystemCallback& callback) = 0;
+ const OpenFileSystemCallback& callback) = 0;
// Returns the specialized FileSystemFileUtil for this mount point.
// It is ok to return NULL if the filesystem doesn't support synchronous
« no previous file with comments | « webkit/browser/fileapi/copy_or_move_operation_delegate_unittest.cc ('k') | webkit/browser/fileapi/file_system_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698