Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: webkit/fileapi/local_file_util.cc

Issue 10834167: Create ShareableFileReference on IO thread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: adding unknown policy for DCHECK Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/fileapi/local_file_util.h ('k') | webkit/fileapi/media/device_media_file_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « webkit/fileapi/local_file_util.h ('k') | webkit/fileapi/media/device_media_file_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698