| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_ISOLATED_FILE_SYSTEM_BACKEND_H_ | 5 #include "storage/browser/fileapi/isolated_file_system_backend.h" |
| 6 #define WEBKIT_BROWSER_FILEAPI_ISOLATED_FILE_SYSTEM_BACKEND_H_ | |
| 7 | |
| 8 #include "base/memory/scoped_ptr.h" | |
| 9 #include "webkit/browser/fileapi/file_system_backend.h" | |
| 10 | |
| 11 namespace storage { | |
| 12 | |
| 13 class AsyncFileUtilAdapter; | |
| 14 | |
| 15 class IsolatedFileSystemBackend : public FileSystemBackend { | |
| 16 public: | |
| 17 IsolatedFileSystemBackend(); | |
| 18 virtual ~IsolatedFileSystemBackend(); | |
| 19 | |
| 20 // FileSystemBackend implementation. | |
| 21 virtual bool CanHandleType(FileSystemType type) const OVERRIDE; | |
| 22 virtual void Initialize(FileSystemContext* context) OVERRIDE; | |
| 23 virtual void ResolveURL(const FileSystemURL& url, | |
| 24 OpenFileSystemMode mode, | |
| 25 const OpenFileSystemCallback& callback) OVERRIDE; | |
| 26 virtual AsyncFileUtil* GetAsyncFileUtil(FileSystemType type) OVERRIDE; | |
| 27 virtual WatcherManager* GetWatcherManager(FileSystemType type) OVERRIDE; | |
| 28 virtual CopyOrMoveFileValidatorFactory* GetCopyOrMoveFileValidatorFactory( | |
| 29 FileSystemType type, | |
| 30 base::File::Error* error_code) OVERRIDE; | |
| 31 virtual FileSystemOperation* CreateFileSystemOperation( | |
| 32 const FileSystemURL& url, | |
| 33 FileSystemContext* context, | |
| 34 base::File::Error* error_code) const OVERRIDE; | |
| 35 virtual bool SupportsStreaming(const FileSystemURL& url) const OVERRIDE; | |
| 36 virtual bool HasInplaceCopyImplementation( | |
| 37 storage::FileSystemType type) const OVERRIDE; | |
| 38 virtual scoped_ptr<storage::FileStreamReader> CreateFileStreamReader( | |
| 39 const FileSystemURL& url, | |
| 40 int64 offset, | |
| 41 const base::Time& expected_modification_time, | |
| 42 FileSystemContext* context) const OVERRIDE; | |
| 43 virtual scoped_ptr<FileStreamWriter> CreateFileStreamWriter( | |
| 44 const FileSystemURL& url, | |
| 45 int64 offset, | |
| 46 FileSystemContext* context) const OVERRIDE; | |
| 47 virtual FileSystemQuotaUtil* GetQuotaUtil() OVERRIDE; | |
| 48 | |
| 49 private: | |
| 50 scoped_ptr<AsyncFileUtilAdapter> isolated_file_util_; | |
| 51 scoped_ptr<AsyncFileUtilAdapter> dragged_file_util_; | |
| 52 scoped_ptr<AsyncFileUtilAdapter> transient_file_util_; | |
| 53 }; | |
| 54 | |
| 55 } // namespace storage | |
| 56 | |
| 57 #endif // WEBKIT_BROWSER_FILEAPI_ISOLATED_FILE_SYSTEM_BACKEND_H_ | |
| OLD | NEW |