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_documents_provider_backend_del
egate.h" |
| 6 |
| 7 #include <utility> |
| 8 |
| 9 #include "base/logging.h" |
| 10 #include "content/public/browser/browser_thread.h" |
| 11 #include "storage/browser/fileapi/file_stream_reader.h" |
| 12 #include "storage/browser/fileapi/file_stream_writer.h" |
| 13 #include "url/gurl.h" |
| 14 |
| 15 using content::BrowserThread; |
| 16 |
| 17 namespace arc { |
| 18 |
| 19 ArcDocumentsProviderBackendDelegate::ArcDocumentsProviderBackendDelegate() = |
| 20 default; |
| 21 |
| 22 ArcDocumentsProviderBackendDelegate::~ArcDocumentsProviderBackendDelegate() { |
| 23 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 24 } |
| 25 |
| 26 storage::AsyncFileUtil* ArcDocumentsProviderBackendDelegate::GetAsyncFileUtil( |
| 27 storage::FileSystemType type) { |
| 28 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 29 return &async_file_util_; |
| 30 } |
| 31 |
| 32 std::unique_ptr<storage::FileStreamReader> |
| 33 ArcDocumentsProviderBackendDelegate::CreateFileStreamReader( |
| 34 const storage::FileSystemURL& url, |
| 35 int64_t offset, |
| 36 int64_t max_bytes_to_read, |
| 37 const base::Time& expected_modification_time, |
| 38 storage::FileSystemContext* context) { |
| 39 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 40 NOTIMPLEMENTED(); // TODO(crbug.com/671511): Implement this function. |
| 41 return nullptr; |
| 42 } |
| 43 |
| 44 std::unique_ptr<storage::FileStreamWriter> |
| 45 ArcDocumentsProviderBackendDelegate::CreateFileStreamWriter( |
| 46 const storage::FileSystemURL& url, |
| 47 int64_t offset, |
| 48 storage::FileSystemContext* context) { |
| 49 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 50 NOTREACHED(); // Read-only file system. |
| 51 return nullptr; |
| 52 } |
| 53 |
| 54 storage::WatcherManager* ArcDocumentsProviderBackendDelegate::GetWatcherManager( |
| 55 storage::FileSystemType type) { |
| 56 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 57 NOTREACHED(); // Non-watchable file system. |
| 58 return nullptr; |
| 59 } |
| 60 |
| 61 void ArcDocumentsProviderBackendDelegate::GetRedirectURLForContents( |
| 62 const storage::FileSystemURL& url, |
| 63 const storage::URLCallback& callback) { |
| 64 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 65 NOTIMPLEMENTED(); // TODO(crbug.com/671511): Implement this function. |
| 66 callback.Run(GURL()); |
| 67 } |
| 68 |
| 69 } // namespace arc |
OLD | NEW |