| 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/fileapi/test_mount_point_provider.h" | 5 #include "webkit/fileapi/test_mount_point_provider.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/file_util.h" | 11 #include "base/file_util.h" |
| 12 #include "base/sequenced_task_runner.h" | 12 #include "base/sequenced_task_runner.h" |
| 13 #include "webkit/fileapi/file_system_file_reader.h" | 13 #include "webkit/fileapi/file_system_file_stream_reader.h" |
| 14 #include "webkit/fileapi/file_system_operation.h" | 14 #include "webkit/fileapi/file_system_operation.h" |
| 15 #include "webkit/fileapi/file_system_quota_util.h" | 15 #include "webkit/fileapi/file_system_quota_util.h" |
| 16 #include "webkit/fileapi/local_file_util.h" | 16 #include "webkit/fileapi/local_file_util.h" |
| 17 #include "webkit/fileapi/native_file_util.h" | 17 #include "webkit/fileapi/native_file_util.h" |
| 18 #include "webkit/fileapi/file_system_util.h" | 18 #include "webkit/fileapi/file_system_util.h" |
| 19 #include "webkit/quota/quota_manager.h" | 19 #include "webkit/quota/quota_manager.h" |
| 20 | 20 |
| 21 namespace fileapi { | 21 namespace fileapi { |
| 22 | 22 |
| 23 namespace { | 23 namespace { |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 | 138 |
| 139 FileSystemOperationInterface* | 139 FileSystemOperationInterface* |
| 140 TestMountPointProvider::CreateFileSystemOperation( | 140 TestMountPointProvider::CreateFileSystemOperation( |
| 141 const GURL& origin_url, | 141 const GURL& origin_url, |
| 142 FileSystemType file_system_type, | 142 FileSystemType file_system_type, |
| 143 const FilePath& virtual_path, | 143 const FilePath& virtual_path, |
| 144 FileSystemContext* context) const { | 144 FileSystemContext* context) const { |
| 145 return new FileSystemOperation(context); | 145 return new FileSystemOperation(context); |
| 146 } | 146 } |
| 147 | 147 |
| 148 webkit_blob::FileReader* TestMountPointProvider::CreateFileReader( | 148 webkit_blob::FileStreamReader* TestMountPointProvider::CreateFileStreamReader( |
| 149 const GURL& url, | 149 const GURL& url, |
| 150 int64 offset, | 150 int64 offset, |
| 151 FileSystemContext* context) const { | 151 FileSystemContext* context) const { |
| 152 return new FileSystemFileReader(context, url, offset); | 152 return new FileSystemFileStreamReader(context, url, offset); |
| 153 } | 153 } |
| 154 | 154 |
| 155 fileapi::FileWriter* TestMountPointProvider::CreateFileWriter( | 155 fileapi::FileWriter* TestMountPointProvider::CreateFileWriter( |
| 156 const GURL& url, | 156 const GURL& url, |
| 157 int64 offset, | 157 int64 offset, |
| 158 FileSystemContext* context) const { | 158 FileSystemContext* context) const { |
| 159 // TODO(kinaba,kinuko): return SandboxFileWriter when it is implemented. | 159 // TODO(kinaba,kinuko): return SandboxFileWriter when it is implemented. |
| 160 NOTIMPLEMENTED(); | 160 NOTIMPLEMENTED(); |
| 161 return NULL; | 161 return NULL; |
| 162 } | 162 } |
| 163 | 163 |
| 164 FileSystemQuotaUtil* TestMountPointProvider::GetQuotaUtil() { | 164 FileSystemQuotaUtil* TestMountPointProvider::GetQuotaUtil() { |
| 165 return quota_util_.get(); | 165 return quota_util_.get(); |
| 166 } | 166 } |
| 167 | 167 |
| 168 } // namespace fileapi | 168 } // namespace fileapi |
| OLD | NEW |