Chromium Code Reviews| 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..af06a0e0b66883bfcdbc10cb73db6c414628d352 100644 |
| --- a/chrome/browser/win/jumplist_file_util.cc |
| +++ b/chrome/browser/win/jumplist_file_util.cc |
| @@ -4,7 +4,6 @@ |
| #include "chrome/browser/win/jumplist_file_util.h" |
| -#include <Shlwapi.h> |
| #include <windows.h> |
| #include "base/files/file_enumerator.h" |
| @@ -100,7 +99,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 +111,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)) { |
|
grt (UTC plus 2)
2017/03/27 08:03:39
nit: omit braces
chengx
2017/03/27 18:32:41
Done.
|
| + dir_status = base::IsDirectoryEmpty(path) ? EMPTY : NON_EMPTY; |
| + } |
| + UMA_HISTOGRAM_ENUMERATION("WinJumplist.DirectoryStatusJumpListIconsOld", |
| + dir_status, DIRECTORY_STATUS_END); |
| } |