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/local_file_util.h" | 5 #include "webkit/fileapi/local_file_util.h" |
6 | 6 |
7 #include "base/file_util_proxy.h" | 7 #include "base/file_util_proxy.h" |
8 #include "googleurl/src/gurl.h" | 8 #include "googleurl/src/gurl.h" |
9 #include "webkit/fileapi/file_system_context.h" | 9 #include "webkit/fileapi/file_system_context.h" |
10 #include "webkit/fileapi/file_system_mount_point_provider.h" | 10 #include "webkit/fileapi/file_system_mount_point_provider.h" |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 PlatformFileError LocalFileUtil::DeleteSingleDirectory( | 262 PlatformFileError LocalFileUtil::DeleteSingleDirectory( |
263 FileSystemOperationContext* context, | 263 FileSystemOperationContext* context, |
264 const FileSystemURL& url) { | 264 const FileSystemURL& url) { |
265 FilePath file_path; | 265 FilePath file_path; |
266 PlatformFileError error = GetLocalFilePath(context, url, &file_path); | 266 PlatformFileError error = GetLocalFilePath(context, url, &file_path); |
267 if (error != base::PLATFORM_FILE_OK) | 267 if (error != base::PLATFORM_FILE_OK) |
268 return error; | 268 return error; |
269 return NativeFileUtil::DeleteSingleDirectory(file_path); | 269 return NativeFileUtil::DeleteSingleDirectory(file_path); |
270 } | 270 } |
271 | 271 |
272 scoped_refptr<webkit_blob::ShareableFileReference> | 272 base::PlatformFileError LocalFileUtil::CreateSnapshotFile( |
273 LocalFileUtil::CreateSnapshotFile( | |
274 FileSystemOperationContext* context, | 273 FileSystemOperationContext* context, |
275 const FileSystemURL& url, | 274 const FileSystemURL& url, |
276 base::PlatformFileError* result, | |
277 base::PlatformFileInfo* file_info, | 275 base::PlatformFileInfo* file_info, |
278 FilePath* platform_path) { | 276 FilePath* platform_path, |
279 DCHECK(result); | 277 SnapshotFilePolicy* policy) { |
280 *result = GetFileInfo(context, url, file_info, platform_path); | 278 DCHECK(policy); |
281 // We don't want the third party to delete our local file, so just returning | 279 // We're just returning the local file information. |
282 // NULL. | 280 *policy = kSnapshotFileLocal; |
283 return NULL; | 281 return GetFileInfo(context, url, file_info, platform_path); |
284 } | 282 } |
285 | 283 |
286 } // namespace fileapi | 284 } // namespace fileapi |
OLD | NEW |