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

Unified Diff: storage/browser/fileapi/obfuscated_file_util.cc

Issue 1471073008: Do not do unnecessary recursive deletes for files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years 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 | « storage/browser/fileapi/file_system_usage_cache.cc ('k') | sync/syncable/syncable_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: storage/browser/fileapi/obfuscated_file_util.cc
diff --git a/storage/browser/fileapi/obfuscated_file_util.cc b/storage/browser/fileapi/obfuscated_file_util.cc
index d46078e85f6e2c12ec4b2d8ac9ecf804c4aaa29a..a9fdb8c6e2da0c96ce98649b1edc2282b467e802 100644
--- a/storage/browser/fileapi/obfuscated_file_util.cc
+++ b/storage/browser/fileapi/obfuscated_file_util.cc
@@ -1052,7 +1052,7 @@ base::File ObfuscatedFileUtil::CreateAndOpenFile(
return base::File(error);
if (base::PathExists(dest_local_path)) {
- if (!base::DeleteFile(dest_local_path, true /* recursive */))
+ if (!base::DeleteFile(dest_local_path, false /* recursive */))
return base::File(base::File::FILE_ERROR_FAILED);
LOG(WARNING) << "A stray file detected";
InvalidateUsageCache(context, dest_url.origin(), dest_url.type());
@@ -1094,7 +1094,7 @@ base::File::Error ObfuscatedFileUtil::CreateFile(
bool created = false;
if (src_file_path.empty()) {
if (base::PathExists(dest_local_path)) {
- if (!base::DeleteFile(dest_local_path, true /* recursive */))
+ if (!base::DeleteFile(dest_local_path, false /* recursive */))
return base::File::FILE_ERROR_FAILED;
LOG(WARNING) << "A stray file detected";
InvalidateUsageCache(context, dest_url.origin(), dest_url.type());
« no previous file with comments | « storage/browser/fileapi/file_system_usage_cache.cc ('k') | sync/syncable/syncable_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698