| 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/isolated_mount_point_provider.h" | 5 #include "webkit/fileapi/isolated_mount_point_provider.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 } | 137 } |
| 138 #endif | 138 #endif |
| 139 | 139 |
| 140 return new LocalFileSystemOperation(context, operation_context.Pass()); | 140 return new LocalFileSystemOperation(context, operation_context.Pass()); |
| 141 } | 141 } |
| 142 | 142 |
| 143 webkit_blob::FileStreamReader* | 143 webkit_blob::FileStreamReader* |
| 144 IsolatedMountPointProvider::CreateFileStreamReader( | 144 IsolatedMountPointProvider::CreateFileStreamReader( |
| 145 const FileSystemURL& url, | 145 const FileSystemURL& url, |
| 146 int64 offset, | 146 int64 offset, |
| 147 const base::Time& expected_modification_time, |
| 147 FileSystemContext* context) const { | 148 FileSystemContext* context) const { |
| 148 return new webkit_blob::LocalFileStreamReader( | 149 return new webkit_blob::LocalFileStreamReader( |
| 149 context->task_runners()->file_task_runner(), | 150 context->task_runners()->file_task_runner(), |
| 150 url.path(), offset, base::Time()); | 151 url.path(), offset, expected_modification_time); |
| 151 } | 152 } |
| 152 | 153 |
| 153 FileStreamWriter* IsolatedMountPointProvider::CreateFileStreamWriter( | 154 FileStreamWriter* IsolatedMountPointProvider::CreateFileStreamWriter( |
| 154 const FileSystemURL& url, | 155 const FileSystemURL& url, |
| 155 int64 offset, | 156 int64 offset, |
| 156 FileSystemContext* context) const { | 157 FileSystemContext* context) const { |
| 157 return new LocalFileStreamWriter(url.path(), offset); | 158 return new LocalFileStreamWriter(url.path(), offset); |
| 158 } | 159 } |
| 159 | 160 |
| 160 FileSystemQuotaUtil* IsolatedMountPointProvider::GetQuotaUtil() { | 161 FileSystemQuotaUtil* IsolatedMountPointProvider::GetQuotaUtil() { |
| 161 // No quota support. | 162 // No quota support. |
| 162 return NULL; | 163 return NULL; |
| 163 } | 164 } |
| 164 | 165 |
| 165 void IsolatedMountPointProvider::DeleteFileSystem( | 166 void IsolatedMountPointProvider::DeleteFileSystem( |
| 166 const GURL& origin_url, | 167 const GURL& origin_url, |
| 167 FileSystemType type, | 168 FileSystemType type, |
| 168 FileSystemContext* context, | 169 FileSystemContext* context, |
| 169 const DeleteFileSystemCallback& callback) { | 170 const DeleteFileSystemCallback& callback) { |
| 170 NOTREACHED(); | 171 NOTREACHED(); |
| 171 callback.Run(base::PLATFORM_FILE_ERROR_INVALID_OPERATION); | 172 callback.Run(base::PLATFORM_FILE_ERROR_INVALID_OPERATION); |
| 172 } | 173 } |
| 173 | 174 |
| 174 } // namespace fileapi | 175 } // namespace fileapi |
| OLD | NEW |