| OLD | NEW |
| 1 // Copyright 2014 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 CHROME_BROWSER_CHROMEOS_DRIVE_FILEAPI_FILE_SYSTEM_BACKEND_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILEAPI_FILE_SYSTEM_BACKEND_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILEAPI_FILE_SYSTEM_BACKEND_DELEGATE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILEAPI_FILE_SYSTEM_BACKEND_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> |
| 11 |
| 10 #include "base/macros.h" | 12 #include "base/macros.h" |
| 11 #include "base/memory/scoped_ptr.h" | |
| 12 #include "chrome/browser/chromeos/fileapi/file_system_backend_delegate.h" | 13 #include "chrome/browser/chromeos/fileapi/file_system_backend_delegate.h" |
| 13 | 14 |
| 14 namespace storage { | 15 namespace storage { |
| 15 class AsyncFileUtil; | 16 class AsyncFileUtil; |
| 16 class FileSystemContext; | 17 class FileSystemContext; |
| 17 class FileStreamReader; | 18 class FileStreamReader; |
| 18 class FileSystemURL; | 19 class FileSystemURL; |
| 19 class FileStreamWriter; | 20 class FileStreamWriter; |
| 20 class WatcherManager; | 21 class WatcherManager; |
| 21 } // namespace storage | 22 } // namespace storage |
| 22 | 23 |
| 23 namespace drive { | 24 namespace drive { |
| 24 | 25 |
| 25 // Delegate implementation of the some methods in chromeos::FileSystemBackend | 26 // Delegate implementation of the some methods in chromeos::FileSystemBackend |
| 26 // for Drive file system. | 27 // for Drive file system. |
| 27 class FileSystemBackendDelegate : public chromeos::FileSystemBackendDelegate { | 28 class FileSystemBackendDelegate : public chromeos::FileSystemBackendDelegate { |
| 28 public: | 29 public: |
| 29 FileSystemBackendDelegate(); | 30 FileSystemBackendDelegate(); |
| 30 ~FileSystemBackendDelegate() override; | 31 ~FileSystemBackendDelegate() override; |
| 31 | 32 |
| 32 // FileSystemBackend::Delegate overrides. | 33 // FileSystemBackend::Delegate overrides. |
| 33 storage::AsyncFileUtil* GetAsyncFileUtil( | 34 storage::AsyncFileUtil* GetAsyncFileUtil( |
| 34 storage::FileSystemType type) override; | 35 storage::FileSystemType type) override; |
| 35 scoped_ptr<storage::FileStreamReader> CreateFileStreamReader( | 36 std::unique_ptr<storage::FileStreamReader> CreateFileStreamReader( |
| 36 const storage::FileSystemURL& url, | 37 const storage::FileSystemURL& url, |
| 37 int64_t offset, | 38 int64_t offset, |
| 38 int64_t max_bytes_to_read, | 39 int64_t max_bytes_to_read, |
| 39 const base::Time& expected_modification_time, | 40 const base::Time& expected_modification_time, |
| 40 storage::FileSystemContext* context) override; | 41 storage::FileSystemContext* context) override; |
| 41 scoped_ptr<storage::FileStreamWriter> CreateFileStreamWriter( | 42 std::unique_ptr<storage::FileStreamWriter> CreateFileStreamWriter( |
| 42 const storage::FileSystemURL& url, | 43 const storage::FileSystemURL& url, |
| 43 int64_t offset, | 44 int64_t offset, |
| 44 storage::FileSystemContext* context) override; | 45 storage::FileSystemContext* context) override; |
| 45 storage::WatcherManager* GetWatcherManager( | 46 storage::WatcherManager* GetWatcherManager( |
| 46 storage::FileSystemType type) override; | 47 storage::FileSystemType type) override; |
| 47 void GetRedirectURLForContents(const storage::FileSystemURL& url, | 48 void GetRedirectURLForContents(const storage::FileSystemURL& url, |
| 48 const storage::URLCallback& callback) override; | 49 const storage::URLCallback& callback) override; |
| 49 | 50 |
| 50 private: | 51 private: |
| 51 scoped_ptr<storage::AsyncFileUtil> async_file_util_; | 52 std::unique_ptr<storage::AsyncFileUtil> async_file_util_; |
| 52 | 53 |
| 53 DISALLOW_COPY_AND_ASSIGN(FileSystemBackendDelegate); | 54 DISALLOW_COPY_AND_ASSIGN(FileSystemBackendDelegate); |
| 54 }; | 55 }; |
| 55 | 56 |
| 56 } // namespace drive | 57 } // namespace drive |
| 57 | 58 |
| 58 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILEAPI_FILE_SYSTEM_BACKEND_DELEGATE_H_ | 59 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILEAPI_FILE_SYSTEM_BACKEND_DELEGATE_H_ |
| OLD | NEW |