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

Unified Diff: webkit/fileapi/local_file_util.cc

Issue 14075016: Change some snapshot- or temporary-file related changes to use ScopedFile (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/fileapi/local_file_util.h ('k') | webkit/fileapi/obfuscated_file_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/local_file_util.cc
diff --git a/webkit/fileapi/local_file_util.cc b/webkit/fileapi/local_file_util.cc
index 77938ec3347ee3c83092be545bd8644618da9c7f..31ab7ea3d7837bbd4b94d8cd4ffa2f2b94a39719 100644
--- a/webkit/fileapi/local_file_util.cc
+++ b/webkit/fileapi/local_file_util.cc
@@ -242,21 +242,18 @@ PlatformFileError LocalFileUtil::DeleteDirectory(
return NativeFileUtil::DeleteDirectory(file_path);
}
-base::PlatformFileError LocalFileUtil::CreateSnapshotFile(
+webkit_blob::ScopedFile LocalFileUtil::CreateSnapshotFile(
FileSystemOperationContext* context,
const FileSystemURL& url,
+ base::PlatformFileError* error,
base::PlatformFileInfo* file_info,
- base::FilePath* platform_path,
- SnapshotFilePolicy* policy) {
- DCHECK(policy);
+ base::FilePath* platform_path) {
DCHECK(file_info);
// We're just returning the local file information.
- *policy = kSnapshotFileLocal;
- base::PlatformFileError error =
- GetFileInfo(context, url, file_info, platform_path);
- if (error == base::PLATFORM_FILE_OK && file_info->is_directory)
- return base::PLATFORM_FILE_ERROR_NOT_A_FILE;
- return error;
+ *error = GetFileInfo(context, url, file_info, platform_path);
+ if (*error == base::PLATFORM_FILE_OK && file_info->is_directory)
+ *error = base::PLATFORM_FILE_ERROR_NOT_A_FILE;
+ return webkit_blob::ScopedFile();
}
} // namespace fileapi
« no previous file with comments | « webkit/fileapi/local_file_util.h ('k') | webkit/fileapi/obfuscated_file_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698