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

Unified Diff: webkit/fileapi/cross_file_util_helper.cc

Issue 9564047: Add FileUtileHelper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add comment Created 8 years, 10 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 | « no previous file | webkit/fileapi/file_system_file_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/cross_file_util_helper.cc
diff --git a/webkit/fileapi/cross_file_util_helper.cc b/webkit/fileapi/cross_file_util_helper.cc
index 1227d190edb02a61d7149b8ad1716f9cc163ff11..414f8ee6b2db63eb3ba3c9c0be246125a4ada891 100644
--- a/webkit/fileapi/cross_file_util_helper.cc
+++ b/webkit/fileapi/cross_file_util_helper.cc
@@ -7,6 +7,7 @@
#include "webkit/fileapi/file_system_file_util.h"
#include "webkit/fileapi/file_system_operation_context.h"
#include "webkit/fileapi/file_system_path.h"
+#include "webkit/fileapi/file_util_helper.h"
using base::PlatformFileError;
@@ -83,7 +84,7 @@ CrossFileUtilHelper::PerformErrorCheckAndPreparationForMoveAndCopy() {
// the file_util's Copy or Move method doesn't perform overwrite
// on all platforms, so we delete the destination directory here.
if (base::PLATFORM_FILE_OK !=
- dest_util_->Delete(context_, dest_root_path_, false /* recursive */)) {
+ dest_util_->DeleteSingleDirectory(context_, dest_root_path_)) {
if (!dest_util_->IsDirectoryEmpty(context_, dest_root_path_))
return base::PLATFORM_FILE_ERROR_NOT_EMPTY;
return base::PLATFORM_FILE_ERROR_FAILED;
@@ -142,7 +143,9 @@ PlatformFileError CrossFileUtilHelper::CopyOrMoveDirectory(
}
if (operation_ == OPERATION_MOVE) {
- PlatformFileError error = src_util_->Delete(context_, src_path, true);
+ PlatformFileError error =
+ FileUtilHelper::DeletePath(context_, src_util_,
kinuko 2012/03/02 22:46:29 Now we introduced the new class we can rename Dele
tzik 2012/03/02 22:59:30 Done.
+ src_path, true /* recursive */);
if (error != base::PLATFORM_FILE_OK)
return error;
}
« no previous file with comments | « no previous file | webkit/fileapi/file_system_file_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698