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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 // Checks if access to |virtual_path| is allowed from |origin_url|. | 61 // Checks if access to |virtual_path| is allowed from |origin_url|. |
62 virtual bool IsAccessAllowed(const GURL& origin_url, | 62 virtual bool IsAccessAllowed(const GURL& origin_url, |
63 FileSystemType type, | 63 FileSystemType type, |
64 const FilePath& virtual_path) = 0; | 64 const FilePath& virtual_path) = 0; |
65 | 65 |
66 // Checks if a given |name| contains any restricted names/chars in it. | 66 // Checks if a given |name| contains any restricted names/chars in it. |
67 // Callable on any thread. | 67 // Callable on any thread. |
68 virtual bool IsRestrictedFileName(const FilePath& filename) const = 0; | 68 virtual bool IsRestrictedFileName(const FilePath& filename) const = 0; |
69 | 69 |
70 // Returns the specialized FileSystemFileUtil for this mount point. | 70 // Returns the specialized FileSystemFileUtil for this mount point. |
71 virtual FileSystemFileUtil* GetFileUtil() = 0; | 71 virtual FileSystemFileUtil* GetFileUtil(FileSystemType type) = 0; |
72 | 72 |
73 // Returns file path we should use to check access permissions for | 73 // Returns file path we should use to check access permissions for |
74 // |virtual_path|. | 74 // |virtual_path|. |
75 virtual FilePath GetPathForPermissionsCheck(const FilePath& virtual_path) | 75 virtual FilePath GetPathForPermissionsCheck(const FilePath& virtual_path) |
76 const = 0; | 76 const = 0; |
77 | 77 |
78 // Returns a new instance of the specialized FileSystemOperation for this | 78 // Returns a new instance of the specialized FileSystemOperation for this |
79 // mount point based on the given triplet of |origin_url|, |file_system_type| | 79 // mount point based on the given triplet of |origin_url|, |file_system_type| |
80 // and |virtual_path|. | 80 // and |virtual_path|. |
81 // This method is usually dispatched by | 81 // This method is usually dispatched by |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 virtual void RemoveMountPoint(const FilePath& mount_point) = 0; | 139 virtual void RemoveMountPoint(const FilePath& mount_point) = 0; |
140 // Gets virtual path by known filesystem path. Returns false when filesystem | 140 // Gets virtual path by known filesystem path. Returns false when filesystem |
141 // path is not exposed by this provider. | 141 // path is not exposed by this provider. |
142 virtual bool GetVirtualPath(const FilePath& file_system_path, | 142 virtual bool GetVirtualPath(const FilePath& file_system_path, |
143 FilePath* virtual_path) = 0; | 143 FilePath* virtual_path) = 0; |
144 }; | 144 }; |
145 | 145 |
146 } // namespace fileapi | 146 } // namespace fileapi |
147 | 147 |
148 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_ | 148 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_ |
OLD | NEW |