| 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_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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 const ValidateFileSystemCallback& callback) = 0; | 53 const ValidateFileSystemCallback& callback) = 0; |
| 54 | 54 |
| 55 // Retrieves the root path of the filesystem specified by the given | 55 // Retrieves the root path of the filesystem specified by the given |
| 56 // file system url on the file thread. | 56 // file system url on the file thread. |
| 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 base::FilePath GetFileSystemRootPathOnFileThread( | 59 virtual base::FilePath GetFileSystemRootPathOnFileThread( |
| 60 const FileSystemURL& url, | 60 const FileSystemURL& url, |
| 61 bool create) = 0; | 61 bool create) = 0; |
| 62 | 62 |
| 63 // Checks if access to |virtual_path| is allowed from |origin_url|. | |
| 64 virtual bool IsAccessAllowed(const FileSystemURL& url) = 0; | |
| 65 | |
| 66 // Checks if a given |name| contains any restricted names/chars in it. | |
| 67 // Callable on any thread. | |
| 68 virtual bool IsRestrictedFileName(const base::FilePath& filename) const = 0; | |
| 69 | |
| 70 // Returns the specialized FileSystemFileUtil for this mount point. | 63 // Returns the specialized FileSystemFileUtil for this mount point. |
| 71 // It is ok to return NULL if the filesystem doesn't support synchronous | 64 // It is ok to return NULL if the filesystem doesn't support synchronous |
| 72 // version of FileUtil. | 65 // version of FileUtil. |
| 73 virtual FileSystemFileUtil* GetFileUtil(FileSystemType type) = 0; | 66 virtual FileSystemFileUtil* GetFileUtil(FileSystemType type) = 0; |
| 74 | 67 |
| 75 // Returns the specialized AsyncFileUtil for this mount point. | 68 // Returns the specialized AsyncFileUtil for this mount point. |
| 76 virtual AsyncFileUtil* GetAsyncFileUtil(FileSystemType type) = 0; | 69 virtual AsyncFileUtil* GetAsyncFileUtil(FileSystemType type) = 0; |
| 77 | 70 |
| 78 // Returns file permission policy we should apply for the given |url|. | 71 // Returns file permission policy we should apply for the given |url|. |
| 79 virtual FilePermissionPolicy GetPermissionPolicy( | 72 virtual FilePermissionPolicy GetPermissionPolicy( |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 const std::string& extension_id) = 0; | 141 const std::string& extension_id) = 0; |
| 149 // Gets virtual path by known filesystem path. Returns false when filesystem | 142 // Gets virtual path by known filesystem path. Returns false when filesystem |
| 150 // path is not exposed by this provider. | 143 // path is not exposed by this provider. |
| 151 virtual bool GetVirtualPath(const base::FilePath& file_system_path, | 144 virtual bool GetVirtualPath(const base::FilePath& file_system_path, |
| 152 base::FilePath* virtual_path) = 0; | 145 base::FilePath* virtual_path) = 0; |
| 153 }; | 146 }; |
| 154 | 147 |
| 155 } // namespace fileapi | 148 } // namespace fileapi |
| 156 | 149 |
| 157 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_ | 150 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_ |
| OLD | NEW |