| 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 |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 | 130 |
| 131 FilePath TestMountPointProvider::GetPathForPermissionsCheck( | 131 FilePath TestMountPointProvider::GetPathForPermissionsCheck( |
| 132 const FilePath& virtual_path) const { | 132 const FilePath& virtual_path) const { |
| 133 return base_path_.Append(virtual_path); | 133 return base_path_.Append(virtual_path); |
| 134 } | 134 } |
| 135 | 135 |
| 136 FileSystemOperationInterface* | 136 FileSystemOperationInterface* |
| 137 TestMountPointProvider::CreateFileSystemOperation( | 137 TestMountPointProvider::CreateFileSystemOperation( |
| 138 const FileSystemURL& url, | 138 const FileSystemURL& url, |
| 139 FileSystemContext* context) const { | 139 FileSystemContext* context) const { |
| 140 return new LocalFileSystemOperation(context); | 140 scoped_ptr<FileSystemOperationContext> operation_context( |
| 141 new FileSystemOperationContext(context)); |
| 142 return new LocalFileSystemOperation(context, operation_context.Pass()); |
| 141 } | 143 } |
| 142 | 144 |
| 143 webkit_blob::FileStreamReader* TestMountPointProvider::CreateFileStreamReader( | 145 webkit_blob::FileStreamReader* TestMountPointProvider::CreateFileStreamReader( |
| 144 const FileSystemURL& url, | 146 const FileSystemURL& url, |
| 145 int64 offset, | 147 int64 offset, |
| 146 FileSystemContext* context) const { | 148 FileSystemContext* context) const { |
| 147 return new FileSystemFileStreamReader(context, url, offset); | 149 return new FileSystemFileStreamReader(context, url, offset); |
| 148 } | 150 } |
| 149 | 151 |
| 150 fileapi::FileStreamWriter* TestMountPointProvider::CreateFileStreamWriter( | 152 fileapi::FileStreamWriter* TestMountPointProvider::CreateFileStreamWriter( |
| 151 const FileSystemURL& url, | 153 const FileSystemURL& url, |
| 152 int64 offset, | 154 int64 offset, |
| 153 FileSystemContext* context) const { | 155 FileSystemContext* context) const { |
| 154 return new SandboxFileStreamWriter(context, url, offset); | 156 return new SandboxFileStreamWriter(context, url, offset); |
| 155 } | 157 } |
| 156 | 158 |
| 157 FileSystemQuotaUtil* TestMountPointProvider::GetQuotaUtil() { | 159 FileSystemQuotaUtil* TestMountPointProvider::GetQuotaUtil() { |
| 158 return quota_util_.get(); | 160 return quota_util_.get(); |
| 159 } | 161 } |
| 160 | 162 |
| 161 } // namespace fileapi | 163 } // namespace fileapi |
| OLD | NEW |