OLD | NEW |
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_BROWSER_FILEAPI_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_ | 5 #ifndef WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_ |
6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_ | 6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 // This verifies if it is allowed to request (or create) the filesystem | 55 // This verifies if it is allowed to request (or create) the filesystem |
56 // and if it can access (or create) the root directory of the mount point. | 56 // and if it can access (or create) the root directory of the mount point. |
57 // If |create| is true this may also create the root directory for | 57 // If |create| is true this may also create the root directory for |
58 // the filesystem if it doesn't exist. | 58 // the filesystem if it doesn't exist. |
59 virtual void ValidateFileSystemRoot( | 59 virtual void ValidateFileSystemRoot( |
60 const GURL& origin_url, | 60 const GURL& origin_url, |
61 FileSystemType type, | 61 FileSystemType type, |
62 bool create, | 62 bool create, |
63 const ValidateFileSystemCallback& callback) = 0; | 63 const ValidateFileSystemCallback& callback) = 0; |
64 | 64 |
65 // Retrieves the root path of the filesystem specified by the given | |
66 // file system url on the file thread. | |
67 // If |create| is true this may also create the root directory for | |
68 // the filesystem if it doesn't exist. | |
69 virtual base::FilePath GetFileSystemRootPathOnFileThread( | |
70 const FileSystemURL& url, | |
71 bool create) = 0; | |
72 | |
73 // Returns the specialized FileSystemFileUtil for this mount point. | 65 // Returns the specialized FileSystemFileUtil for this mount point. |
74 // It is ok to return NULL if the filesystem doesn't support synchronous | 66 // It is ok to return NULL if the filesystem doesn't support synchronous |
75 // version of FileUtil. | 67 // version of FileUtil. |
76 virtual FileSystemFileUtil* GetFileUtil(FileSystemType type) = 0; | 68 virtual FileSystemFileUtil* GetFileUtil(FileSystemType type) = 0; |
77 | 69 |
78 // Returns the specialized AsyncFileUtil for this mount point. | 70 // Returns the specialized AsyncFileUtil for this mount point. |
79 virtual AsyncFileUtil* GetAsyncFileUtil(FileSystemType type) = 0; | 71 virtual AsyncFileUtil* GetAsyncFileUtil(FileSystemType type) = 0; |
80 | 72 |
81 // Returns the specialized CopyOrMoveFileValidatorFactory for this mount | 73 // Returns the specialized CopyOrMoveFileValidatorFactory for this mount |
82 // point and |type|. If |error_code| is PLATFORM_FILE_OK and the result | 74 // point and |type|. If |error_code| is PLATFORM_FILE_OK and the result |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 const std::string& extension_id) = 0; | 160 const std::string& extension_id) = 0; |
169 // Gets virtual path by known filesystem path. Returns false when filesystem | 161 // Gets virtual path by known filesystem path. Returns false when filesystem |
170 // path is not exposed by this provider. | 162 // path is not exposed by this provider. |
171 virtual bool GetVirtualPath(const base::FilePath& file_system_path, | 163 virtual bool GetVirtualPath(const base::FilePath& file_system_path, |
172 base::FilePath* virtual_path) = 0; | 164 base::FilePath* virtual_path) = 0; |
173 }; | 165 }; |
174 | 166 |
175 } // namespace fileapi | 167 } // namespace fileapi |
176 | 168 |
177 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_ | 169 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_ |
OLD | NEW |