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

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

Issue 2779403002: Migrate jumplist update task from FILE thread to base/task_scheduler (Closed)
Patch Set: Use CreateCOMSTATaskRunnerWithTraits. 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
« chrome/browser/win/jumplist.cc ('K') | « chrome/browser/win/jumplist.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_file_util.cc
diff --git a/chrome/browser/win/jumplist_file_util.cc b/chrome/browser/win/jumplist_file_util.cc
index 66d9651a64ba3e4347b8eb7ffe1eee8128d2f532..cb405fdecdfb48b9c8ed1ff23dad9f8554cc9b91 100644
--- a/chrome/browser/win/jumplist_file_util.cc
+++ b/chrome/browser/win/jumplist_file_util.cc
@@ -109,13 +109,14 @@ FolderDeleteResult DeleteDirectory(const base::FilePath& path,
void DeleteDirectoryAndLogResults(const base::FilePath& path,
int max_file_deleted) {
- 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))
+
+ if (base::DirectoryExists(path)) {
+ FolderDeleteResult delete_status = DeleteDirectory(path, max_file_deleted);
+ UMA_HISTOGRAM_ENUMERATION("WinJumplist.DeleteStatusJumpListIconsOld",
gab 2017/04/04 21:11:46 Why do we need a separate histogram? Why isn't his
chengx 2017/04/05 00:23:24 JumpListIcons folder and JumpListIconsOld folder o
gab 2017/04/05 20:53:26 I see, hadn't noticed the different enums, prefixi
+ delete_status, END);
dir_status = base::IsDirectoryEmpty(path) ? EMPTY : NON_EMPTY;
+ }
UMA_HISTOGRAM_ENUMERATION("WinJumplist.DirectoryStatusJumpListIconsOld",
dir_status, DIRECTORY_STATUS_END);
« chrome/browser/win/jumplist.cc ('K') | « chrome/browser/win/jumplist.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698