| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_PLUGIN_PRIVATE_FILE_SYSTEM_BACKEND_H_ | 5 #ifndef WEBKIT_BROWSER_FILEAPI_PLUGIN_PRIVATE_FILE_SYSTEM_BACKEND_H_ |
| 6 #define WEBKIT_BROWSER_FILEAPI_PLUGIN_PRIVATE_FILE_SYSTEM_BACKEND_H_ | 6 #define WEBKIT_BROWSER_FILEAPI_PLUGIN_PRIVATE_FILE_SYSTEM_BACKEND_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 namespace fileapi { | 29 namespace fileapi { |
| 30 | 30 |
| 31 class ObfuscatedFileUtil; | 31 class ObfuscatedFileUtil; |
| 32 | 32 |
| 33 class WEBKIT_STORAGE_BROWSER_EXPORT PluginPrivateFileSystemBackend | 33 class WEBKIT_STORAGE_BROWSER_EXPORT PluginPrivateFileSystemBackend |
| 34 : public FileSystemBackend, | 34 : public FileSystemBackend, |
| 35 public FileSystemQuotaUtil { | 35 public FileSystemQuotaUtil { |
| 36 public: | 36 public: |
| 37 class FileSystemIDToPluginMap; | 37 class FileSystemIDToPluginMap; |
| 38 typedef base::Callback<void(base::PlatformFileError result)> StatusCallback; | 38 typedef base::Callback<void(base::File::Error result)> StatusCallback; |
| 39 | 39 |
| 40 PluginPrivateFileSystemBackend( | 40 PluginPrivateFileSystemBackend( |
| 41 base::SequencedTaskRunner* file_task_runner, | 41 base::SequencedTaskRunner* file_task_runner, |
| 42 const base::FilePath& profile_path, | 42 const base::FilePath& profile_path, |
| 43 quota::SpecialStoragePolicy* special_storage_policy, | 43 quota::SpecialStoragePolicy* special_storage_policy, |
| 44 const FileSystemOptions& file_system_options); | 44 const FileSystemOptions& file_system_options); |
| 45 virtual ~PluginPrivateFileSystemBackend(); | 45 virtual ~PluginPrivateFileSystemBackend(); |
| 46 | 46 |
| 47 // This must be used to open 'private' filesystem instead of regular | 47 // This must be used to open 'private' filesystem instead of regular |
| 48 // OpenFileSystem. | 48 // OpenFileSystem. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 62 virtual bool CanHandleType(FileSystemType type) const OVERRIDE; | 62 virtual bool CanHandleType(FileSystemType type) const OVERRIDE; |
| 63 virtual void Initialize(FileSystemContext* context) OVERRIDE; | 63 virtual void Initialize(FileSystemContext* context) OVERRIDE; |
| 64 virtual void OpenFileSystem( | 64 virtual void OpenFileSystem( |
| 65 const GURL& origin_url, | 65 const GURL& origin_url, |
| 66 FileSystemType type, | 66 FileSystemType type, |
| 67 OpenFileSystemMode mode, | 67 OpenFileSystemMode mode, |
| 68 const OpenFileSystemCallback& callback) OVERRIDE; | 68 const OpenFileSystemCallback& callback) OVERRIDE; |
| 69 virtual AsyncFileUtil* GetAsyncFileUtil(FileSystemType type) OVERRIDE; | 69 virtual AsyncFileUtil* GetAsyncFileUtil(FileSystemType type) OVERRIDE; |
| 70 virtual CopyOrMoveFileValidatorFactory* GetCopyOrMoveFileValidatorFactory( | 70 virtual CopyOrMoveFileValidatorFactory* GetCopyOrMoveFileValidatorFactory( |
| 71 FileSystemType type, | 71 FileSystemType type, |
| 72 base::PlatformFileError* error_code) OVERRIDE; | 72 base::File::Error* error_code) OVERRIDE; |
| 73 virtual FileSystemOperation* CreateFileSystemOperation( | 73 virtual FileSystemOperation* CreateFileSystemOperation( |
| 74 const FileSystemURL& url, | 74 const FileSystemURL& url, |
| 75 FileSystemContext* context, | 75 FileSystemContext* context, |
| 76 base::PlatformFileError* error_code) const OVERRIDE; | 76 base::File::Error* error_code) const OVERRIDE; |
| 77 virtual scoped_ptr<webkit_blob::FileStreamReader> CreateFileStreamReader( | 77 virtual scoped_ptr<webkit_blob::FileStreamReader> CreateFileStreamReader( |
| 78 const FileSystemURL& url, | 78 const FileSystemURL& url, |
| 79 int64 offset, | 79 int64 offset, |
| 80 const base::Time& expected_modification_time, | 80 const base::Time& expected_modification_time, |
| 81 FileSystemContext* context) const OVERRIDE; | 81 FileSystemContext* context) const OVERRIDE; |
| 82 virtual scoped_ptr<FileStreamWriter> CreateFileStreamWriter( | 82 virtual scoped_ptr<FileStreamWriter> CreateFileStreamWriter( |
| 83 const FileSystemURL& url, | 83 const FileSystemURL& url, |
| 84 int64 offset, | 84 int64 offset, |
| 85 FileSystemContext* context) const OVERRIDE; | 85 FileSystemContext* context) const OVERRIDE; |
| 86 virtual FileSystemQuotaUtil* GetQuotaUtil() OVERRIDE; | 86 virtual FileSystemQuotaUtil* GetQuotaUtil() OVERRIDE; |
| 87 | 87 |
| 88 // FileSystemQuotaUtil overrides. | 88 // FileSystemQuotaUtil overrides. |
| 89 virtual base::PlatformFileError DeleteOriginDataOnFileTaskRunner( | 89 virtual base::File::Error DeleteOriginDataOnFileTaskRunner( |
| 90 FileSystemContext* context, | 90 FileSystemContext* context, |
| 91 quota::QuotaManagerProxy* proxy, | 91 quota::QuotaManagerProxy* proxy, |
| 92 const GURL& origin_url, | 92 const GURL& origin_url, |
| 93 FileSystemType type) OVERRIDE; | 93 FileSystemType type) OVERRIDE; |
| 94 virtual void GetOriginsForTypeOnFileTaskRunner( | 94 virtual void GetOriginsForTypeOnFileTaskRunner( |
| 95 FileSystemType type, | 95 FileSystemType type, |
| 96 std::set<GURL>* origins) OVERRIDE; | 96 std::set<GURL>* origins) OVERRIDE; |
| 97 virtual void GetOriginsForHostOnFileTaskRunner( | 97 virtual void GetOriginsForHostOnFileTaskRunner( |
| 98 FileSystemType type, | 98 FileSystemType type, |
| 99 const std::string& host, | 99 const std::string& host, |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 scoped_ptr<AsyncFileUtil> file_util_; | 137 scoped_ptr<AsyncFileUtil> file_util_; |
| 138 FileSystemIDToPluginMap* plugin_map_; // Owned by file_util_. | 138 FileSystemIDToPluginMap* plugin_map_; // Owned by file_util_. |
| 139 base::WeakPtrFactory<PluginPrivateFileSystemBackend> weak_factory_; | 139 base::WeakPtrFactory<PluginPrivateFileSystemBackend> weak_factory_; |
| 140 | 140 |
| 141 DISALLOW_COPY_AND_ASSIGN(PluginPrivateFileSystemBackend); | 141 DISALLOW_COPY_AND_ASSIGN(PluginPrivateFileSystemBackend); |
| 142 }; | 142 }; |
| 143 | 143 |
| 144 } // namespace fileapi | 144 } // namespace fileapi |
| 145 | 145 |
| 146 #endif // WEBKIT_BROWSER_FILEAPI_PLUGIN_PRIVATE_FILE_SYSTEM_BACKEND_H_ | 146 #endif // WEBKIT_BROWSER_FILEAPI_PLUGIN_PRIVATE_FILE_SYSTEM_BACKEND_H_ |
| OLD | NEW |