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

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

Issue 2778513002: Delete JumpListIconsOld and update revised links in every update (Closed)
Patch Set: Address comments. Created 3 years, 9 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 | « chrome/browser/win/jumplist_file_util.h ('k') | chrome/browser/win/jumplist_file_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/win/jumplist_file_util.cc
diff --git a/chrome/browser/win/jumplist_file_util.cc b/chrome/browser/win/jumplist_file_util.cc
index f66cc71d57b3a4d7ba7a36ba51dbd871b2f52882..66d9651a64ba3e4347b8eb7ffe1eee8128d2f532 100644
--- a/chrome/browser/win/jumplist_file_util.cc
+++ b/chrome/browser/win/jumplist_file_util.cc
@@ -4,10 +4,10 @@
#include "chrome/browser/win/jumplist_file_util.h"
-#include <Shlwapi.h>
#include <windows.h>
#include "base/files/file_enumerator.h"
+#include "base/files/file_util.h"
#include "base/metrics/histogram_macros.h"
#include "base/threading/thread_restrictions.h"
@@ -100,7 +100,7 @@ FolderDeleteResult DeleteDirectory(const base::FilePath& path,
// files, its return value cannot indicate if |path| is empty or not.
// Instead, use PathIsDirectoryEmpty to check if |path| is empty and remove it
// if it is.
- if (::PathIsDirectoryEmpty(path.value().c_str()) &&
+ if (base::IsDirectoryEmpty(path) &&
!::RemoveDirectory(path.value().c_str())) {
delete_status = FAIL_REMOVE_RAW_DIRECTORY;
}
@@ -112,4 +112,11 @@ void DeleteDirectoryAndLogResults(const base::FilePath& path,
FolderDeleteResult delete_status = DeleteDirectory(path, max_file_deleted);
UMA_HISTOGRAM_ENUMERATION("WinJumplist.DeleteStatusJumpListIconsOld",
delete_status, END);
+
+ DirectoryStatus dir_status = NON_EXIST;
+ if (base::DirectoryExists(path))
+ dir_status = base::IsDirectoryEmpty(path) ? EMPTY : NON_EMPTY;
+
+ UMA_HISTOGRAM_ENUMERATION("WinJumplist.DirectoryStatusJumpListIconsOld",
+ dir_status, DIRECTORY_STATUS_END);
}
« no previous file with comments | « chrome/browser/win/jumplist_file_util.h ('k') | chrome/browser/win/jumplist_file_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698