| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/chromeos/file_system_provider/fileapi/backend_delegate.
h" | |
| 6 | |
| 7 #include "base/memory/scoped_ptr.h" | |
| 8 #include "chrome/browser/chromeos/file_system_provider/fileapi/provider_async_fi
le_util.h" | |
| 9 #include "content/public/browser/browser_thread.h" | |
| 10 #include "webkit/browser/blob/file_stream_reader.h" | |
| 11 #include "webkit/browser/fileapi/file_stream_writer.h" | |
| 12 #include "webkit/browser/fileapi/file_system_url.h" | |
| 13 | |
| 14 using content::BrowserThread; | |
| 15 | |
| 16 namespace chromeos { | |
| 17 namespace file_system_provider { | |
| 18 | |
| 19 BackendDelegate::BackendDelegate() | |
| 20 : async_file_util_(new internal::ProviderAsyncFileUtil) {} | |
| 21 | |
| 22 BackendDelegate::~BackendDelegate() {} | |
| 23 | |
| 24 fileapi::AsyncFileUtil* BackendDelegate::GetAsyncFileUtil( | |
| 25 fileapi::FileSystemType type) { | |
| 26 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | |
| 27 DCHECK_EQ(fileapi::kFileSystemTypeProvided, type); | |
| 28 return async_file_util_.get(); | |
| 29 } | |
| 30 | |
| 31 scoped_ptr<webkit_blob::FileStreamReader> | |
| 32 BackendDelegate::CreateFileStreamReader( | |
| 33 const fileapi::FileSystemURL& url, | |
| 34 int64 offset, | |
| 35 const base::Time& expected_modification_time, | |
| 36 fileapi::FileSystemContext* context) { | |
| 37 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | |
| 38 DCHECK_EQ(fileapi::kFileSystemTypeProvided, url.type()); | |
| 39 NOTIMPLEMENTED(); | |
| 40 return scoped_ptr<webkit_blob::FileStreamReader>(); | |
| 41 } | |
| 42 | |
| 43 scoped_ptr<fileapi::FileStreamWriter> BackendDelegate::CreateFileStreamWriter( | |
| 44 const fileapi::FileSystemURL& url, | |
| 45 int64 offset, | |
| 46 fileapi::FileSystemContext* context) { | |
| 47 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | |
| 48 DCHECK_EQ(fileapi::kFileSystemTypeProvided, url.type()); | |
| 49 NOTIMPLEMENTED(); | |
| 50 return scoped_ptr<fileapi::FileStreamWriter>(); | |
| 51 } | |
| 52 | |
| 53 } // namespace file_system_provider | |
| 54 } // namespace chromeos | |
| OLD | NEW |