| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "webkit/browser/fileapi/isolated_file_system_backend.h" | 5 #include "webkit/browser/fileapi/isolated_file_system_backend.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 storage::FileSystemType type) const { | 115 storage::FileSystemType type) const { |
| 116 DCHECK(type == kFileSystemTypeNativeLocal || type == kFileSystemTypeDragged || | 116 DCHECK(type == kFileSystemTypeNativeLocal || type == kFileSystemTypeDragged || |
| 117 type == kFileSystemTypeForTransientFile); | 117 type == kFileSystemTypeForTransientFile); |
| 118 return false; | 118 return false; |
| 119 } | 119 } |
| 120 | 120 |
| 121 scoped_ptr<storage::FileStreamReader> | 121 scoped_ptr<storage::FileStreamReader> |
| 122 IsolatedFileSystemBackend::CreateFileStreamReader( | 122 IsolatedFileSystemBackend::CreateFileStreamReader( |
| 123 const FileSystemURL& url, | 123 const FileSystemURL& url, |
| 124 int64 offset, | 124 int64 offset, |
| 125 int64 max_bytes_to_read, |
| 125 const base::Time& expected_modification_time, | 126 const base::Time& expected_modification_time, |
| 126 FileSystemContext* context) const { | 127 FileSystemContext* context) const { |
| 127 return scoped_ptr<storage::FileStreamReader>( | 128 return scoped_ptr<storage::FileStreamReader>( |
| 128 storage::FileStreamReader::CreateForLocalFile( | 129 storage::FileStreamReader::CreateForLocalFile( |
| 129 context->default_file_task_runner(), | 130 context->default_file_task_runner(), |
| 130 url.path(), | 131 url.path(), |
| 131 offset, | 132 offset, |
| 132 expected_modification_time)); | 133 expected_modification_time)); |
| 133 } | 134 } |
| 134 | 135 |
| 135 scoped_ptr<FileStreamWriter> IsolatedFileSystemBackend::CreateFileStreamWriter( | 136 scoped_ptr<FileStreamWriter> IsolatedFileSystemBackend::CreateFileStreamWriter( |
| 136 const FileSystemURL& url, | 137 const FileSystemURL& url, |
| 137 int64 offset, | 138 int64 offset, |
| 138 FileSystemContext* context) const { | 139 FileSystemContext* context) const { |
| 139 return scoped_ptr<FileStreamWriter>( | 140 return scoped_ptr<FileStreamWriter>( |
| 140 FileStreamWriter::CreateForLocalFile( | 141 FileStreamWriter::CreateForLocalFile( |
| 141 context->default_file_task_runner(), | 142 context->default_file_task_runner(), |
| 142 url.path(), | 143 url.path(), |
| 143 offset, | 144 offset, |
| 144 FileStreamWriter::OPEN_EXISTING_FILE)); | 145 FileStreamWriter::OPEN_EXISTING_FILE)); |
| 145 } | 146 } |
| 146 | 147 |
| 147 FileSystemQuotaUtil* IsolatedFileSystemBackend::GetQuotaUtil() { | 148 FileSystemQuotaUtil* IsolatedFileSystemBackend::GetQuotaUtil() { |
| 148 // No quota support. | 149 // No quota support. |
| 149 return NULL; | 150 return NULL; |
| 150 } | 151 } |
| 151 | 152 |
| 152 } // namespace storage | 153 } // namespace storage |
| OLD | NEW |