| 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_FILEAPI_MTP_FILE_SYSTEM_BACKEND_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_FILEAPI_MTP_FILE_SYSTEM_BACKEND_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_FILEAPI_MTP_FILE_SYSTEM_BACKEND_DELEGATE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_FILEAPI_MTP_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 #include "chrome/browser/chromeos/fileapi/mtp_watcher_manager.h" | 14 #include "chrome/browser/chromeos/fileapi/mtp_watcher_manager.h" |
| 14 | 15 |
| 15 namespace base { | 16 namespace base { |
| 16 class FilePath; | 17 class FilePath; |
| 17 } // namespace base | 18 } // namespace base |
| 18 | 19 |
| 19 namespace storage { | 20 namespace storage { |
| 20 class AsyncFileUtil; | 21 class AsyncFileUtil; |
| 21 class FileSystemContext; | 22 class FileSystemContext; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 33 // file API backend. | 34 // file API backend. |
| 34 class MTPFileSystemBackendDelegate : public FileSystemBackendDelegate { | 35 class MTPFileSystemBackendDelegate : public FileSystemBackendDelegate { |
| 35 public: | 36 public: |
| 36 explicit MTPFileSystemBackendDelegate( | 37 explicit MTPFileSystemBackendDelegate( |
| 37 const base::FilePath& storage_partition_path); | 38 const base::FilePath& storage_partition_path); |
| 38 ~MTPFileSystemBackendDelegate() override; | 39 ~MTPFileSystemBackendDelegate() override; |
| 39 | 40 |
| 40 // FileSystemBackendDelegate overrides. | 41 // FileSystemBackendDelegate overrides. |
| 41 storage::AsyncFileUtil* GetAsyncFileUtil( | 42 storage::AsyncFileUtil* GetAsyncFileUtil( |
| 42 storage::FileSystemType type) override; | 43 storage::FileSystemType type) override; |
| 43 scoped_ptr<storage::FileStreamReader> CreateFileStreamReader( | 44 std::unique_ptr<storage::FileStreamReader> CreateFileStreamReader( |
| 44 const storage::FileSystemURL& url, | 45 const storage::FileSystemURL& url, |
| 45 int64_t offset, | 46 int64_t offset, |
| 46 int64_t max_bytes_to_read, | 47 int64_t max_bytes_to_read, |
| 47 const base::Time& expected_modification_time, | 48 const base::Time& expected_modification_time, |
| 48 storage::FileSystemContext* context) override; | 49 storage::FileSystemContext* context) override; |
| 49 scoped_ptr<storage::FileStreamWriter> CreateFileStreamWriter( | 50 std::unique_ptr<storage::FileStreamWriter> CreateFileStreamWriter( |
| 50 const storage::FileSystemURL& url, | 51 const storage::FileSystemURL& url, |
| 51 int64_t offset, | 52 int64_t offset, |
| 52 storage::FileSystemContext* context) override; | 53 storage::FileSystemContext* context) override; |
| 53 storage::WatcherManager* GetWatcherManager( | 54 storage::WatcherManager* GetWatcherManager( |
| 54 storage::FileSystemType type) override; | 55 storage::FileSystemType type) override; |
| 55 void GetRedirectURLForContents(const storage::FileSystemURL& url, | 56 void GetRedirectURLForContents(const storage::FileSystemURL& url, |
| 56 const storage::URLCallback& callback) override; | 57 const storage::URLCallback& callback) override; |
| 57 | 58 |
| 58 private: | 59 private: |
| 59 scoped_ptr<DeviceMediaAsyncFileUtil> device_media_async_file_util_; | 60 std::unique_ptr<DeviceMediaAsyncFileUtil> device_media_async_file_util_; |
| 60 scoped_ptr<MTPWatcherManager> mtp_watcher_manager_; | 61 std::unique_ptr<MTPWatcherManager> mtp_watcher_manager_; |
| 61 | 62 |
| 62 DISALLOW_COPY_AND_ASSIGN(MTPFileSystemBackendDelegate); | 63 DISALLOW_COPY_AND_ASSIGN(MTPFileSystemBackendDelegate); |
| 63 }; | 64 }; |
| 64 | 65 |
| 65 } // namespace chromeos | 66 } // namespace chromeos |
| 66 | 67 |
| 67 #endif // CHROME_BROWSER_CHROMEOS_FILEAPI_MTP_FILE_SYSTEM_BACKEND_DELEGATE_H_ | 68 #endif // CHROME_BROWSER_CHROMEOS_FILEAPI_MTP_FILE_SYSTEM_BACKEND_DELEGATE_H_ |
| OLD | NEW |