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_BACKEND_H_ | 5 #ifndef WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_BACKEND_H_ |
6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_BACKEND_H_ | 6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_BACKEND_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 virtual void InitializeFileSystem( | 62 virtual void InitializeFileSystem( |
63 const GURL& origin_url, | 63 const GURL& origin_url, |
64 FileSystemType type, | 64 FileSystemType type, |
65 OpenFileSystemMode mode, | 65 OpenFileSystemMode mode, |
66 FileSystemContext* context, | 66 FileSystemContext* context, |
67 const InitializeFileSystemCallback& callback) = 0; | 67 const InitializeFileSystemCallback& callback) = 0; |
68 | 68 |
69 // Returns the specialized FileSystemFileUtil for this mount point. | 69 // Returns the specialized FileSystemFileUtil for this mount point. |
70 // It is ok to return NULL if the filesystem doesn't support synchronous | 70 // It is ok to return NULL if the filesystem doesn't support synchronous |
71 // version of FileUtil. | 71 // version of FileUtil. |
72 virtual FileSystemFileUtil* GetFileUtil(FileSystemType type) = 0; | 72 virtual FileSystemFileUtil* GetFileUtil( |
| 73 FileSystemType type, |
| 74 const FileSystemContext* context) = 0; |
73 | 75 |
74 // Returns the specialized AsyncFileUtil for this mount point. | 76 // Returns the specialized AsyncFileUtil for this mount point. |
75 virtual AsyncFileUtil* GetAsyncFileUtil(FileSystemType type) = 0; | 77 virtual AsyncFileUtil* GetAsyncFileUtil( |
| 78 FileSystemType type, |
| 79 const FileSystemContext* context) = 0; |
76 | 80 |
77 // Returns the specialized CopyOrMoveFileValidatorFactory for this mount | 81 // Returns the specialized CopyOrMoveFileValidatorFactory for this mount |
78 // point and |type|. If |error_code| is PLATFORM_FILE_OK and the result | 82 // point and |type|. If |error_code| is PLATFORM_FILE_OK and the result |
79 // is NULL, then no validator is required. | 83 // is NULL, then no validator is required. |
80 virtual CopyOrMoveFileValidatorFactory* GetCopyOrMoveFileValidatorFactory( | 84 virtual CopyOrMoveFileValidatorFactory* GetCopyOrMoveFileValidatorFactory( |
81 FileSystemType type, base::PlatformFileError* error_code) = 0; | 85 FileSystemType type, base::PlatformFileError* error_code) = 0; |
82 | 86 |
83 // Returns a new instance of the specialized FileSystemOperation for this | 87 // Returns a new instance of the specialized FileSystemOperation for this |
84 // mount point based on the given triplet of |origin_url|, |file_system_type| | 88 // mount point based on the given triplet of |origin_url|, |file_system_type| |
85 // and |virtual_path|. On failure to create a file system operation, set | 89 // and |virtual_path|. On failure to create a file system operation, set |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 const std::string& extension_id) = 0; | 147 const std::string& extension_id) = 0; |
144 // Gets virtual path by known filesystem path. Returns false when filesystem | 148 // Gets virtual path by known filesystem path. Returns false when filesystem |
145 // path is not exposed by this provider. | 149 // path is not exposed by this provider. |
146 virtual bool GetVirtualPath(const base::FilePath& file_system_path, | 150 virtual bool GetVirtualPath(const base::FilePath& file_system_path, |
147 base::FilePath* virtual_path) = 0; | 151 base::FilePath* virtual_path) = 0; |
148 }; | 152 }; |
149 | 153 |
150 } // namespace fileapi | 154 } // namespace fileapi |
151 | 155 |
152 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_BACKEND_H_ | 156 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_BACKEND_H_ |
OLD | NEW |