Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_BACKEND_DELEG ATE_H_ | |
| 6 #define CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_BACKEND_DELEG ATE_H_ | |
| 7 | |
| 8 #include <memory> | |
| 9 | |
| 10 #include "base/macros.h" | |
| 11 #include "base/memory/weak_ptr.h" | |
| 12 #include "chrome/browser/chromeos/arc/fileapi/arc_documents_provider_async_file_ util.h" | |
| 13 #include "chrome/browser/chromeos/fileapi/file_system_backend_delegate.h" | |
| 14 | |
| 15 namespace storage { | |
| 16 class AsyncFileUtil; | |
| 17 class FileSystemContext; | |
| 18 class FileStreamReader; | |
| 19 class FileStreamWriter; | |
| 20 class FileSystemURL; | |
| 21 } // namespace storage | |
| 22 | |
| 23 namespace arc { | |
| 24 | |
| 25 // Implements ARC documents provider filesystem. | |
| 26 class ArcDocumentsProviderBackendDelegate | |
| 27 : public chromeos::FileSystemBackendDelegate { | |
| 28 public: | |
| 29 ArcDocumentsProviderBackendDelegate(); | |
| 30 ~ArcDocumentsProviderBackendDelegate() override; | |
| 31 | |
| 32 // FileSystemBackend::Delegate overrides. | |
| 33 storage::AsyncFileUtil* GetAsyncFileUtil( | |
| 34 storage::FileSystemType type) override; | |
| 35 std::unique_ptr<storage::FileStreamReader> CreateFileStreamReader( | |
| 36 const storage::FileSystemURL& url, | |
| 37 int64_t offset, | |
| 38 int64_t max_bytes_to_read, | |
| 39 const base::Time& expected_modification_time, | |
| 40 storage::FileSystemContext* context) override; | |
| 41 std::unique_ptr<storage::FileStreamWriter> CreateFileStreamWriter( | |
| 42 const storage::FileSystemURL& url, | |
| 43 int64_t offset, | |
| 44 storage::FileSystemContext* context) override; | |
| 45 storage::WatcherManager* GetWatcherManager( | |
| 46 storage::FileSystemType type) override; | |
| 47 void GetRedirectURLForContents(const storage::FileSystemURL& url, | |
| 48 const storage::URLCallback& callback) override; | |
| 49 | |
| 50 private: | |
| 51 ArcDocumentsProviderAsyncFileUtil async_file_util_; | |
|
hashimoto
2016/12/13 07:52:29
How about adding this when it's actually needed?
Shuhei Takahashi
2016/12/13 10:27:47
Done. I assume you meant a line below :)
| |
| 52 base::WeakPtrFactory<ArcDocumentsProviderBackendDelegate> weak_ptr_factory_; | |
| 53 | |
| 54 DISALLOW_COPY_AND_ASSIGN(ArcDocumentsProviderBackendDelegate); | |
| 55 }; | |
| 56 | |
| 57 } // namespace arc | |
| 58 | |
| 59 #endif // CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_BACKEND_DE LEGATE_H_ | |
| OLD | NEW |