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 #include "chrome/browser/chromeos/arc/fileapi/arc_content_file_system_backend_de
legate.h" |
| 6 |
| 7 #include "chrome/browser/chromeos/arc/fileapi/arc_content_file_system_async_file
_util.h" |
| 8 #include "chrome/browser/chromeos/arc/fileapi/arc_content_file_system_file_strea
m_reader.h" |
| 9 #include "content/public/browser/browser_thread.h" |
| 10 #include "storage/browser/fileapi/file_stream_writer.h" |
| 11 #include "storage/browser/fileapi/file_system_url.h" |
| 12 |
| 13 namespace arc { |
| 14 |
| 15 ArcContentFileSystemBackendDelegate::ArcContentFileSystemBackendDelegate() |
| 16 : async_file_util_(new ArcContentFileSystemAsyncFileUtil()) {} |
| 17 |
| 18 ArcContentFileSystemBackendDelegate::~ArcContentFileSystemBackendDelegate() = |
| 19 default; |
| 20 |
| 21 storage::AsyncFileUtil* ArcContentFileSystemBackendDelegate::GetAsyncFileUtil( |
| 22 storage::FileSystemType type) { |
| 23 DCHECK_CURRENTLY_ON(content::BrowserThread::IO); |
| 24 DCHECK_EQ(storage::kFileSystemTypeArcContent, type); |
| 25 return async_file_util_.get(); |
| 26 } |
| 27 |
| 28 std::unique_ptr<storage::FileStreamReader> |
| 29 ArcContentFileSystemBackendDelegate::CreateFileStreamReader( |
| 30 const storage::FileSystemURL& url, |
| 31 int64_t offset, |
| 32 int64_t max_bytes_to_read, |
| 33 const base::Time& expected_modification_time, |
| 34 storage::FileSystemContext* context) { |
| 35 DCHECK_CURRENTLY_ON(content::BrowserThread::IO); |
| 36 DCHECK_EQ(storage::kFileSystemTypeArcContent, url.type()); |
| 37 return std::unique_ptr<storage::FileStreamReader>( |
| 38 new ArcContentFileSystemFileStreamReader(url, offset, max_bytes_to_read)); |
| 39 } |
| 40 |
| 41 std::unique_ptr<storage::FileStreamWriter> |
| 42 ArcContentFileSystemBackendDelegate::CreateFileStreamWriter( |
| 43 const storage::FileSystemURL& url, |
| 44 int64_t offset, |
| 45 storage::FileSystemContext* context) { |
| 46 NOTIMPLEMENTED(); |
| 47 return std::unique_ptr<storage::FileStreamWriter>(); |
| 48 } |
| 49 |
| 50 storage::WatcherManager* ArcContentFileSystemBackendDelegate::GetWatcherManager( |
| 51 storage::FileSystemType type) { |
| 52 NOTIMPLEMENTED(); |
| 53 return nullptr; |
| 54 } |
| 55 |
| 56 void ArcContentFileSystemBackendDelegate::GetRedirectURLForContents( |
| 57 const storage::FileSystemURL& url, |
| 58 const storage::URLCallback& callback) { |
| 59 NOTIMPLEMENTED(); |
| 60 } |
| 61 |
| 62 } // namespace arc |
OLD | NEW |