| 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_TEST_MOUNT_POINT_PROVIDER_H_ | 5 #ifndef WEBKIT_BROWSER_FILEAPI_TEST_FILE_SYSTEM_BACKEND_H_ |
| 6 #define WEBKIT_BROWSER_FILEAPI_TEST_MOUNT_POINT_PROVIDER_H_ | 6 #define WEBKIT_BROWSER_FILEAPI_TEST_FILE_SYSTEM_BACKEND_H_ |
| 7 | 7 |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "webkit/browser/fileapi/async_file_util_adapter.h" | 11 #include "webkit/browser/fileapi/async_file_util_adapter.h" |
| 12 #include "webkit/browser/fileapi/file_system_mount_point_provider.h" | 12 #include "webkit/browser/fileapi/file_system_backend.h" |
| 13 #include "webkit/browser/fileapi/task_runner_bound_observer_list.h" | 13 #include "webkit/browser/fileapi/task_runner_bound_observer_list.h" |
| 14 #include "webkit/browser/webkit_storage_browser_export.h" | 14 #include "webkit/browser/webkit_storage_browser_export.h" |
| 15 | 15 |
| 16 namespace base { | 16 namespace base { |
| 17 class SequencedTaskRunner; | 17 class SequencedTaskRunner; |
| 18 } | 18 } |
| 19 | 19 |
| 20 namespace fileapi { | 20 namespace fileapi { |
| 21 | 21 |
| 22 class AsyncFileUtilAdapter; | 22 class AsyncFileUtilAdapter; |
| 23 class FileSystemQuotaUtil; | 23 class FileSystemQuotaUtil; |
| 24 | 24 |
| 25 // This should be only used for testing. | 25 // This should be only used for testing. |
| 26 // This mount point provider uses LocalFileUtil and stores data file | 26 // This file system backend uses LocalFileUtil and stores data file |
| 27 // under the given directory. | 27 // under the given directory. |
| 28 class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE TestMountPointProvider | 28 class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE TestFileSystemBackend |
| 29 : public FileSystemMountPointProvider { | 29 : public FileSystemBackend { |
| 30 public: | 30 public: |
| 31 TestMountPointProvider( | 31 TestFileSystemBackend( |
| 32 base::SequencedTaskRunner* task_runner, | 32 base::SequencedTaskRunner* task_runner, |
| 33 const base::FilePath& base_path); | 33 const base::FilePath& base_path); |
| 34 virtual ~TestMountPointProvider(); | 34 virtual ~TestFileSystemBackend(); |
| 35 | 35 |
| 36 // FileSystemMountPointProvider implementation. | 36 // FileSystemBackend implementation. |
| 37 virtual bool CanHandleType(FileSystemType type) const OVERRIDE; | 37 virtual bool CanHandleType(FileSystemType type) const OVERRIDE; |
| 38 virtual void OpenFileSystem( | 38 virtual void OpenFileSystem( |
| 39 const GURL& origin_url, | 39 const GURL& origin_url, |
| 40 FileSystemType type, | 40 FileSystemType type, |
| 41 OpenFileSystemMode mode, | 41 OpenFileSystemMode mode, |
| 42 const OpenFileSystemCallback& callback) OVERRIDE; | 42 const OpenFileSystemCallback& callback) OVERRIDE; |
| 43 virtual FileSystemFileUtil* GetFileUtil(FileSystemType type) OVERRIDE; | 43 virtual FileSystemFileUtil* GetFileUtil(FileSystemType type) OVERRIDE; |
| 44 virtual AsyncFileUtil* GetAsyncFileUtil(FileSystemType type) OVERRIDE; | 44 virtual AsyncFileUtil* GetAsyncFileUtil(FileSystemType type) OVERRIDE; |
| 45 virtual CopyOrMoveFileValidatorFactory* GetCopyOrMoveFileValidatorFactory( | 45 virtual CopyOrMoveFileValidatorFactory* GetCopyOrMoveFileValidatorFactory( |
| 46 FileSystemType type, | 46 FileSystemType type, |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 scoped_refptr<base::SequencedTaskRunner> task_runner_; | 82 scoped_refptr<base::SequencedTaskRunner> task_runner_; |
| 83 scoped_ptr<AsyncFileUtilAdapter> local_file_util_; | 83 scoped_ptr<AsyncFileUtilAdapter> local_file_util_; |
| 84 scoped_ptr<QuotaUtil> quota_util_; | 84 scoped_ptr<QuotaUtil> quota_util_; |
| 85 UpdateObserverList update_observers_; | 85 UpdateObserverList update_observers_; |
| 86 ChangeObserverList change_observers_; | 86 ChangeObserverList change_observers_; |
| 87 | 87 |
| 88 bool require_copy_or_move_validator_; | 88 bool require_copy_or_move_validator_; |
| 89 scoped_ptr<CopyOrMoveFileValidatorFactory> | 89 scoped_ptr<CopyOrMoveFileValidatorFactory> |
| 90 copy_or_move_file_validator_factory_; | 90 copy_or_move_file_validator_factory_; |
| 91 | 91 |
| 92 DISALLOW_COPY_AND_ASSIGN(TestMountPointProvider); | 92 DISALLOW_COPY_AND_ASSIGN(TestFileSystemBackend); |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 } // namespace fileapi | 95 } // namespace fileapi |
| 96 | 96 |
| 97 #endif // WEBKIT_BROWSER_FILEAPI_TEST_MOUNT_POINT_PROVIDER_H_ | 97 #endif // WEBKIT_BROWSER_FILEAPI_TEST_FILE_SYSTEM_BACKEND_H_ |
| OLD | NEW |