| 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 #include "chrome/browser/chromeos/drive/fileapi/file_system_backend_delegate.h" | 5 #include "chrome/browser/chromeos/drive/fileapi/file_system_backend_delegate.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "chrome/browser/chromeos/drive/file_system_util.h" | 10 #include "chrome/browser/chromeos/drive/file_system_util.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 storage::FileSystemType type) { | 34 storage::FileSystemType type) { |
| 35 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 35 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 36 DCHECK_EQ(storage::kFileSystemTypeDrive, type); | 36 DCHECK_EQ(storage::kFileSystemTypeDrive, type); |
| 37 return async_file_util_.get(); | 37 return async_file_util_.get(); |
| 38 } | 38 } |
| 39 | 39 |
| 40 scoped_ptr<storage::FileStreamReader> | 40 scoped_ptr<storage::FileStreamReader> |
| 41 FileSystemBackendDelegate::CreateFileStreamReader( | 41 FileSystemBackendDelegate::CreateFileStreamReader( |
| 42 const storage::FileSystemURL& url, | 42 const storage::FileSystemURL& url, |
| 43 int64 offset, | 43 int64 offset, |
| 44 int64 max_bytes_to_read, |
| 44 const base::Time& expected_modification_time, | 45 const base::Time& expected_modification_time, |
| 45 storage::FileSystemContext* context) { | 46 storage::FileSystemContext* context) { |
| 46 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 47 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 47 DCHECK_EQ(storage::kFileSystemTypeDrive, url.type()); | 48 DCHECK_EQ(storage::kFileSystemTypeDrive, url.type()); |
| 48 | 49 |
| 49 base::FilePath file_path = util::ExtractDrivePathFromFileSystemUrl(url); | 50 base::FilePath file_path = util::ExtractDrivePathFromFileSystemUrl(url); |
| 50 if (file_path.empty()) | 51 if (file_path.empty()) |
| 51 return scoped_ptr<storage::FileStreamReader>(); | 52 return scoped_ptr<storage::FileStreamReader>(); |
| 52 | 53 |
| 53 return scoped_ptr<storage::FileStreamReader>( | 54 return scoped_ptr<storage::FileStreamReader>( |
| (...skipping 26 matching lines...) Expand all Loading... |
| 80 offset)); | 81 offset)); |
| 81 } | 82 } |
| 82 | 83 |
| 83 storage::WatcherManager* FileSystemBackendDelegate::GetWatcherManager( | 84 storage::WatcherManager* FileSystemBackendDelegate::GetWatcherManager( |
| 84 const storage::FileSystemURL& url) { | 85 const storage::FileSystemURL& url) { |
| 85 NOTIMPLEMENTED(); | 86 NOTIMPLEMENTED(); |
| 86 return NULL; | 87 return NULL; |
| 87 } | 88 } |
| 88 | 89 |
| 89 } // namespace drive | 90 } // namespace drive |
| OLD | NEW |