| 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_stream_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/file_system_util.h" | 16 #include "webkit/fileapi/file_system_util.h" |
| 17 #include "webkit/fileapi/local_file_util.h" | 17 #include "webkit/fileapi/local_file_util.h" |
| 18 #include "webkit/fileapi/native_file_util.h" | 18 #include "webkit/fileapi/native_file_util.h" |
| 19 #include "webkit/fileapi/sandbox_file_stream_writer.h" |
| 19 #include "webkit/quota/quota_manager.h" | 20 #include "webkit/quota/quota_manager.h" |
| 20 | 21 |
| 21 namespace fileapi { | 22 namespace fileapi { |
| 22 | 23 |
| 23 namespace { | 24 namespace { |
| 24 | 25 |
| 25 // This only supports single origin. | 26 // This only supports single origin. |
| 26 class TestFileSystemQuotaUtil : public FileSystemQuotaUtil { | 27 class TestFileSystemQuotaUtil : public FileSystemQuotaUtil { |
| 27 public: | 28 public: |
| 28 explicit TestFileSystemQuotaUtil(base::SequencedTaskRunner* task_runner) | 29 explicit TestFileSystemQuotaUtil(base::SequencedTaskRunner* task_runner) |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 const GURL& url, | 150 const GURL& url, |
| 150 int64 offset, | 151 int64 offset, |
| 151 FileSystemContext* context) const { | 152 FileSystemContext* context) const { |
| 152 return new FileSystemFileStreamReader(context, url, offset); | 153 return new FileSystemFileStreamReader(context, url, offset); |
| 153 } | 154 } |
| 154 | 155 |
| 155 fileapi::FileStreamWriter* TestMountPointProvider::CreateFileStreamWriter( | 156 fileapi::FileStreamWriter* TestMountPointProvider::CreateFileStreamWriter( |
| 156 const GURL& url, | 157 const GURL& url, |
| 157 int64 offset, | 158 int64 offset, |
| 158 FileSystemContext* context) const { | 159 FileSystemContext* context) const { |
| 159 // TODO(kinaba,kinuko): return SandboxFileWriter when it is implemented. | 160 return new SandboxFileStreamWriter(context, url, offset); |
| 160 NOTIMPLEMENTED(); | |
| 161 return NULL; | |
| 162 } | 161 } |
| 163 | 162 |
| 164 FileSystemQuotaUtil* TestMountPointProvider::GetQuotaUtil() { | 163 FileSystemQuotaUtil* TestMountPointProvider::GetQuotaUtil() { |
| 165 return quota_util_.get(); | 164 return quota_util_.get(); |
| 166 } | 165 } |
| 167 | 166 |
| 168 } // namespace fileapi | 167 } // namespace fileapi |
| OLD | NEW |