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

Side by Side Diff: webkit/fileapi/file_system_mount_point_provider.h

Issue 10828043: Wire up the deleteFileSystem operation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adds comment. Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/fileapi/file_system_context.cc ('k') | webkit/fileapi/file_system_quota_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_ 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_
6 #define WEBKIT_FILEAPI_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_ 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 17 matching lines...) Expand all
28 class FileSystemQuotaUtil; 28 class FileSystemQuotaUtil;
29 class RemoteFileSystemProxyInterface; 29 class RemoteFileSystemProxyInterface;
30 30
31 // An interface to provide mount-point-specific path-related utilities 31 // An interface to provide mount-point-specific path-related utilities
32 // and specialized FileSystemFileUtil instance. 32 // and specialized FileSystemFileUtil instance.
33 class FILEAPI_EXPORT FileSystemMountPointProvider { 33 class FILEAPI_EXPORT FileSystemMountPointProvider {
34 public: 34 public:
35 // Callback for ValidateFileSystemRoot. 35 // Callback for ValidateFileSystemRoot.
36 typedef base::Callback<void(base::PlatformFileError error)> 36 typedef base::Callback<void(base::PlatformFileError error)>
37 ValidateFileSystemCallback; 37 ValidateFileSystemCallback;
38 typedef base::Callback<void(base::PlatformFileError error)>
39 DeleteFileSystemCallback;
38 virtual ~FileSystemMountPointProvider() {} 40 virtual ~FileSystemMountPointProvider() {}
39 41
40 // Validates the filesystem for the given |origin_url| and |type|. 42 // Validates the filesystem for the given |origin_url| and |type|.
41 // This verifies if it is allowed to request (or create) the filesystem 43 // This verifies if it is allowed to request (or create) the filesystem
42 // and if it can access (or create) the root directory of the mount point. 44 // and if it can access (or create) the root directory of the mount point.
43 // If |create| is true this may also create the root directory for 45 // If |create| is true this may also create the root directory for
44 // the filesystem if it doesn't exist. 46 // the filesystem if it doesn't exist.
45 virtual void ValidateFileSystemRoot( 47 virtual void ValidateFileSystemRoot(
46 const GURL& origin_url, 48 const GURL& origin_url,
47 FileSystemType type, 49 FileSystemType type,
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 // This method itself does *not* check if the given path exists and is a 102 // This method itself does *not* check if the given path exists and is a
101 // regular file. 103 // regular file.
102 virtual FileStreamWriter* CreateFileStreamWriter( 104 virtual FileStreamWriter* CreateFileStreamWriter(
103 const FileSystemURL& url, 105 const FileSystemURL& url,
104 int64 offset, 106 int64 offset,
105 FileSystemContext* context) const = 0; 107 FileSystemContext* context) const = 0;
106 108
107 // Returns the specialized FileSystemQuotaUtil for this mount point. 109 // Returns the specialized FileSystemQuotaUtil for this mount point.
108 // This could return NULL if this mount point does not support quota. 110 // This could return NULL if this mount point does not support quota.
109 virtual FileSystemQuotaUtil* GetQuotaUtil() = 0; 111 virtual FileSystemQuotaUtil* GetQuotaUtil() = 0;
112
113 // Deletes the filesystem for the given |origin_url| and |type|.
114 virtual void DeleteFileSystem(
115 const GURL& origin_url,
116 FileSystemType type,
117 FileSystemContext* context,
118 const DeleteFileSystemCallback& callback) = 0;
110 }; 119 };
111 120
112 // An interface to control external file system access permissions. 121 // An interface to control external file system access permissions.
113 class ExternalFileSystemMountPointProvider 122 class ExternalFileSystemMountPointProvider
114 : public FileSystemMountPointProvider { 123 : public FileSystemMountPointProvider {
115 public: 124 public:
116 // Returns the list of top level directories that are exposed by this 125 // Returns the list of top level directories that are exposed by this
117 // provider. This list is used to set appropriate child process file access 126 // provider. This list is used to set appropriate child process file access
118 // permissions. 127 // permissions.
119 virtual std::vector<FilePath> GetRootDirectories() const = 0; 128 virtual std::vector<FilePath> GetRootDirectories() const = 0;
(...skipping 19 matching lines...) Expand all
139 virtual void RemoveMountPoint(const FilePath& mount_point) = 0; 148 virtual void RemoveMountPoint(const FilePath& mount_point) = 0;
140 // Gets virtual path by known filesystem path. Returns false when filesystem 149 // Gets virtual path by known filesystem path. Returns false when filesystem
141 // path is not exposed by this provider. 150 // path is not exposed by this provider.
142 virtual bool GetVirtualPath(const FilePath& file_system_path, 151 virtual bool GetVirtualPath(const FilePath& file_system_path,
143 FilePath* virtual_path) = 0; 152 FilePath* virtual_path) = 0;
144 }; 153 };
145 154
146 } // namespace fileapi 155 } // namespace fileapi
147 156
148 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_ 157 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_
OLDNEW
« no previous file with comments | « webkit/fileapi/file_system_context.cc ('k') | webkit/fileapi/file_system_quota_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698