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_CONTEXT_H_ | 5 #ifndef WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_CONTEXT_H_ |
6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_CONTEXT_H_ | 6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_CONTEXT_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 void Shutdown(); | 112 void Shutdown(); |
113 | 113 |
114 // Returns a quota util for a given filesystem type. This may | 114 // Returns a quota util for a given filesystem type. This may |
115 // return NULL if the type does not support the usage tracking or | 115 // return NULL if the type does not support the usage tracking or |
116 // it is not a quota-managed storage. | 116 // it is not a quota-managed storage. |
117 FileSystemQuotaUtil* GetQuotaUtil(FileSystemType type) const; | 117 FileSystemQuotaUtil* GetQuotaUtil(FileSystemType type) const; |
118 | 118 |
119 // Returns the appropriate AsyncFileUtil instance for the given |type|. | 119 // Returns the appropriate AsyncFileUtil instance for the given |type|. |
120 AsyncFileUtil* GetAsyncFileUtil(FileSystemType type) const; | 120 AsyncFileUtil* GetAsyncFileUtil(FileSystemType type) const; |
121 | 121 |
122 // Returns the appropriate FileUtil instance for the given |type|. | |
123 // This may return NULL if it is given an invalid type or the filesystem | |
124 // does not support synchronous file operations. | |
125 FileSystemFileUtil* GetFileUtil(FileSystemType type) const; | |
126 | |
127 // Returns the appropriate CopyOrMoveFileValidatorFactory for the given | 122 // Returns the appropriate CopyOrMoveFileValidatorFactory for the given |
128 // |type|. If |error_code| is PLATFORM_FILE_OK and the result is NULL, | 123 // |type|. If |error_code| is PLATFORM_FILE_OK and the result is NULL, |
129 // then no validator is required. | 124 // then no validator is required. |
130 CopyOrMoveFileValidatorFactory* GetCopyOrMoveFileValidatorFactory( | 125 CopyOrMoveFileValidatorFactory* GetCopyOrMoveFileValidatorFactory( |
131 FileSystemType type, base::PlatformFileError* error_code) const; | 126 FileSystemType type, base::PlatformFileError* error_code) const; |
132 | 127 |
133 // Returns the file system backend instance for the given |type|. | 128 // Returns the file system backend instance for the given |type|. |
134 // This may return NULL if it is given an invalid or unsupported filesystem | 129 // This may return NULL if it is given an invalid or unsupported filesystem |
135 // type. | 130 // type. |
136 FileSystemBackend* GetFileSystemBackend( | 131 FileSystemBackend* GetFileSystemBackend( |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 | 315 |
321 struct DefaultContextDeleter { | 316 struct DefaultContextDeleter { |
322 static void Destruct(const FileSystemContext* context) { | 317 static void Destruct(const FileSystemContext* context) { |
323 context->DeleteOnCorrectThread(); | 318 context->DeleteOnCorrectThread(); |
324 } | 319 } |
325 }; | 320 }; |
326 | 321 |
327 } // namespace fileapi | 322 } // namespace fileapi |
328 | 323 |
329 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_CONTEXT_H_ | 324 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_CONTEXT_H_ |
OLD | NEW |