| 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 CONTENT_PUBLIC_TEST_TEST_FILE_SYSTEM_BACKEND_H_ | 5 #ifndef CONTENT_PUBLIC_TEST_TEST_FILE_SYSTEM_BACKEND_H_ |
| 6 #define CONTENT_PUBLIC_TEST_TEST_FILE_SYSTEM_BACKEND_H_ | 6 #define CONTENT_PUBLIC_TEST_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" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 // This file system backend uses LocalFileUtil and stores data file | 27 // This file system backend uses LocalFileUtil and stores data file |
| 28 // under the given directory. | 28 // under the given directory. |
| 29 class TestFileSystemBackend : public storage::FileSystemBackend { | 29 class TestFileSystemBackend : public storage::FileSystemBackend { |
| 30 public: | 30 public: |
| 31 TestFileSystemBackend( | 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 ~TestFileSystemBackend(); | 34 virtual ~TestFileSystemBackend(); |
| 35 | 35 |
| 36 // FileSystemBackend implementation. | 36 // FileSystemBackend implementation. |
| 37 virtual bool CanHandleType(storage::FileSystemType type) const OVERRIDE; | 37 virtual bool CanHandleType(storage::FileSystemType type) const override; |
| 38 virtual void Initialize(storage::FileSystemContext* context) OVERRIDE; | 38 virtual void Initialize(storage::FileSystemContext* context) override; |
| 39 virtual void ResolveURL(const storage::FileSystemURL& url, | 39 virtual void ResolveURL(const storage::FileSystemURL& url, |
| 40 storage::OpenFileSystemMode mode, | 40 storage::OpenFileSystemMode mode, |
| 41 const OpenFileSystemCallback& callback) OVERRIDE; | 41 const OpenFileSystemCallback& callback) override; |
| 42 virtual storage::AsyncFileUtil* GetAsyncFileUtil( | 42 virtual storage::AsyncFileUtil* GetAsyncFileUtil( |
| 43 storage::FileSystemType type) OVERRIDE; | 43 storage::FileSystemType type) override; |
| 44 virtual storage::WatcherManager* GetWatcherManager( | 44 virtual storage::WatcherManager* GetWatcherManager( |
| 45 storage::FileSystemType type) OVERRIDE; | 45 storage::FileSystemType type) override; |
| 46 virtual storage::CopyOrMoveFileValidatorFactory* | 46 virtual storage::CopyOrMoveFileValidatorFactory* |
| 47 GetCopyOrMoveFileValidatorFactory(storage::FileSystemType type, | 47 GetCopyOrMoveFileValidatorFactory(storage::FileSystemType type, |
| 48 base::File::Error* error_code) OVERRIDE; | 48 base::File::Error* error_code) override; |
| 49 virtual storage::FileSystemOperation* CreateFileSystemOperation( | 49 virtual storage::FileSystemOperation* CreateFileSystemOperation( |
| 50 const storage::FileSystemURL& url, | 50 const storage::FileSystemURL& url, |
| 51 storage::FileSystemContext* context, | 51 storage::FileSystemContext* context, |
| 52 base::File::Error* error_code) const OVERRIDE; | 52 base::File::Error* error_code) const override; |
| 53 virtual bool SupportsStreaming( | 53 virtual bool SupportsStreaming( |
| 54 const storage::FileSystemURL& url) const OVERRIDE; | 54 const storage::FileSystemURL& url) const override; |
| 55 virtual bool HasInplaceCopyImplementation( | 55 virtual bool HasInplaceCopyImplementation( |
| 56 storage::FileSystemType type) const OVERRIDE; | 56 storage::FileSystemType type) const override; |
| 57 virtual scoped_ptr<storage::FileStreamReader> CreateFileStreamReader( | 57 virtual scoped_ptr<storage::FileStreamReader> CreateFileStreamReader( |
| 58 const storage::FileSystemURL& url, | 58 const storage::FileSystemURL& url, |
| 59 int64 offset, | 59 int64 offset, |
| 60 int64 max_bytes_to_read, | 60 int64 max_bytes_to_read, |
| 61 const base::Time& expected_modification_time, | 61 const base::Time& expected_modification_time, |
| 62 storage::FileSystemContext* context) const OVERRIDE; | 62 storage::FileSystemContext* context) const override; |
| 63 virtual scoped_ptr<storage::FileStreamWriter> CreateFileStreamWriter( | 63 virtual scoped_ptr<storage::FileStreamWriter> CreateFileStreamWriter( |
| 64 const storage::FileSystemURL& url, | 64 const storage::FileSystemURL& url, |
| 65 int64 offset, | 65 int64 offset, |
| 66 storage::FileSystemContext* context) const OVERRIDE; | 66 storage::FileSystemContext* context) const override; |
| 67 virtual storage::FileSystemQuotaUtil* GetQuotaUtil() OVERRIDE; | 67 virtual storage::FileSystemQuotaUtil* GetQuotaUtil() override; |
| 68 virtual const storage::UpdateObserverList* GetUpdateObservers( | 68 virtual const storage::UpdateObserverList* GetUpdateObservers( |
| 69 storage::FileSystemType type) const OVERRIDE; | 69 storage::FileSystemType type) const override; |
| 70 virtual const storage::ChangeObserverList* GetChangeObservers( | 70 virtual const storage::ChangeObserverList* GetChangeObservers( |
| 71 storage::FileSystemType type) const OVERRIDE; | 71 storage::FileSystemType type) const override; |
| 72 virtual const storage::AccessObserverList* GetAccessObservers( | 72 virtual const storage::AccessObserverList* GetAccessObservers( |
| 73 storage::FileSystemType type) const OVERRIDE; | 73 storage::FileSystemType type) const override; |
| 74 | 74 |
| 75 // Initialize the CopyOrMoveFileValidatorFactory. Invalid to call more than | 75 // Initialize the CopyOrMoveFileValidatorFactory. Invalid to call more than |
| 76 // once. | 76 // once. |
| 77 void InitializeCopyOrMoveFileValidatorFactory( | 77 void InitializeCopyOrMoveFileValidatorFactory( |
| 78 scoped_ptr<storage::CopyOrMoveFileValidatorFactory> factory); | 78 scoped_ptr<storage::CopyOrMoveFileValidatorFactory> factory); |
| 79 | 79 |
| 80 void AddFileChangeObserver(storage::FileChangeObserver* observer); | 80 void AddFileChangeObserver(storage::FileChangeObserver* observer); |
| 81 | 81 |
| 82 // For CopyOrMoveFileValidatorFactory testing. Once it's set to true | 82 // For CopyOrMoveFileValidatorFactory testing. Once it's set to true |
| 83 // GetCopyOrMoveFileValidatorFactory will start returning security | 83 // GetCopyOrMoveFileValidatorFactory will start returning security |
| (...skipping 16 matching lines...) Expand all Loading... |
| 100 bool require_copy_or_move_validator_; | 100 bool require_copy_or_move_validator_; |
| 101 scoped_ptr<storage::CopyOrMoveFileValidatorFactory> | 101 scoped_ptr<storage::CopyOrMoveFileValidatorFactory> |
| 102 copy_or_move_file_validator_factory_; | 102 copy_or_move_file_validator_factory_; |
| 103 | 103 |
| 104 DISALLOW_COPY_AND_ASSIGN(TestFileSystemBackend); | 104 DISALLOW_COPY_AND_ASSIGN(TestFileSystemBackend); |
| 105 }; | 105 }; |
| 106 | 106 |
| 107 } // namespace content | 107 } // namespace content |
| 108 | 108 |
| 109 #endif // CONTENT_PUBLIC_TEST_TEST_FILE_SYSTEM_BACKEND_H_ | 109 #endif // CONTENT_PUBLIC_TEST_TEST_FILE_SYSTEM_BACKEND_H_ |
| OLD | NEW |