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

Unified Diff: chrome/browser/win/jumplist.cc

Issue 2577163002: A follow-up nit fix for jumplist file operations (Closed)
Patch Set: Created 4 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
« base/files/file_util_win.cc ('K') | « base/files/file_util_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/win/jumplist.cc
diff --git a/chrome/browser/win/jumplist.cc b/chrome/browser/win/jumplist.cc
index f1ead043a73fb3a4bbdd6f96df49560f510b5e5b..508093dfa290fa460552fa29d95bdf17c8b071eb 100644
--- a/chrome/browser/win/jumplist.cc
+++ b/chrome/browser/win/jumplist.cc
@@ -251,9 +251,9 @@ void RunUpdateOnFileThread(
};
// This variable records the status of three folder operations.
- int folder_operation_status = FolderOperationResult::SUCCESS;
chengx 2016/12/15 19:51:54 grt@ nit: always use an unsigned type to hold a bi
+ uint32_t folder_operation_status = FolderOperationResult::SUCCESS;
- if (base::PathExists(icon_dir_old) && !base::DeleteFile(icon_dir_old, true)) {
chengx 2016/12/15 19:51:54 grt@ base::PathExists is unnecessary -- DeleteFile
+ if (!base::DeleteFile(icon_dir_old, true)) {
folder_operation_status |= FolderOperationResult::DELETE_DEST_FAILED;
// If deletion of |icon_dir_old| fails, do not move |icon_dir| to
// |icon_dir_old|, instead, delete |icon_dir| directly to avoid bloating
« base/files/file_util_win.cc ('K') | « base/files/file_util_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698