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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 // directory (and/or related database entries etc) for the filesystem if it | 64 // directory (and/or related database entries etc) for the filesystem if it |
65 // doesn't exist. | 65 // doesn't exist. |
66 virtual void ResolveURL(const FileSystemURL& url, | 66 virtual void ResolveURL(const FileSystemURL& url, |
67 OpenFileSystemMode mode, | 67 OpenFileSystemMode mode, |
68 const OpenFileSystemCallback& callback) = 0; | 68 const OpenFileSystemCallback& callback) = 0; |
69 | 69 |
70 // Returns the specialized AsyncFileUtil for this backend. | 70 // Returns the specialized AsyncFileUtil for this backend. |
71 virtual AsyncFileUtil* GetAsyncFileUtil(FileSystemType type) = 0; | 71 virtual AsyncFileUtil* GetAsyncFileUtil(FileSystemType type) = 0; |
72 | 72 |
73 // Returns the specialized CopyOrMoveFileValidatorFactory for this backend | 73 // Returns the specialized CopyOrMoveFileValidatorFactory for this backend |
74 // and |type|. If |error_code| is PLATFORM_FILE_OK and the result is NULL, | 74 // and |type|. If |error_code| is File::FILE_OK and the result is NULL, |
75 // then no validator is required. | 75 // then no validator is required. |
76 virtual CopyOrMoveFileValidatorFactory* GetCopyOrMoveFileValidatorFactory( | 76 virtual CopyOrMoveFileValidatorFactory* GetCopyOrMoveFileValidatorFactory( |
77 FileSystemType type, base::File::Error* error_code) = 0; | 77 FileSystemType type, base::File::Error* error_code) = 0; |
78 | 78 |
79 // Returns a new instance of the specialized FileSystemOperation for this | 79 // Returns a new instance of the specialized FileSystemOperation for this |
80 // backend based on the given triplet of |origin_url|, |file_system_type| | 80 // backend based on the given triplet of |origin_url|, |file_system_type| |
81 // and |virtual_path|. On failure to create a file system operation, set | 81 // and |virtual_path|. On failure to create a file system operation, set |
82 // |error_code| correspondingly. | 82 // |error_code| correspondingly. |
83 // This method is usually dispatched by | 83 // This method is usually dispatched by |
84 // FileSystemContext::CreateFileSystemOperation. | 84 // FileSystemContext::CreateFileSystemOperation. |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 const std::string& extension_id) = 0; | 144 const std::string& extension_id) = 0; |
145 // Gets virtual path by known filesystem path. Returns false when filesystem | 145 // Gets virtual path by known filesystem path. Returns false when filesystem |
146 // path is not exposed by this provider. | 146 // path is not exposed by this provider. |
147 virtual bool GetVirtualPath(const base::FilePath& file_system_path, | 147 virtual bool GetVirtualPath(const base::FilePath& file_system_path, |
148 base::FilePath* virtual_path) = 0; | 148 base::FilePath* virtual_path) = 0; |
149 }; | 149 }; |
150 | 150 |
151 } // namespace fileapi | 151 } // namespace fileapi |
152 | 152 |
153 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_BACKEND_H_ | 153 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_BACKEND_H_ |
OLD | NEW |