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

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

Issue 2848763002: Re-enable UMA metric WinJumplist.CreateIconFilesCount (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | 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 6dad5579697389d68a137d050de08c7ae6b97199..a3b9b236e93ec289d19b2eb16b143ebbce6bfd0f 100644
--- a/chrome/browser/win/jumplist.cc
+++ b/chrome/browser/win/jumplist.cc
@@ -240,6 +240,9 @@ bool UpdateJumpList(const wchar_t* app_id,
recently_closed_items = recently_closed_pages.size();
}
+ // Record the amout of icons created per JumpList update.
grt (UTC plus 2) 2017/04/28 07:17:00 nit: amount -> number
chengx 2017/04/28 18:12:40 Done.
+ int icons_created = 0;
+
if (most_visited_pages_have_updates) {
// Delete the content in JumpListIconsMostVisited folder and log the results
// to UMA.
@@ -259,6 +262,8 @@ bool UpdateJumpList(const wchar_t* app_id,
// Create icon files for shortcuts in the "Most Visited" category.
CreateIconFiles(icon_dir_most_visited, most_visited_pages,
most_visited_items);
+
+ icons_created += std::min(most_visited_pages.size(), most_visited_items);
grt (UTC plus 2) 2017/04/28 07:17:00 is the intention to report the number of files suc
chengx 2017/04/28 18:12:40 Actually, I only care about the number of icons th
}
}
@@ -276,10 +281,16 @@ bool UpdateJumpList(const wchar_t* app_id,
// Create icon files for shortcuts in the "Recently Closed" category.
CreateIconFiles(icon_dir_recent_closed, recently_closed_pages,
recently_closed_items);
+
+ icons_created +=
+ std::min(recently_closed_pages.size(), recently_closed_items);
}
}
// TODO(chengx): Remove the UMA histogram after fixing http://crbug.com/40407.
+ UMA_HISTOGRAM_COUNTS_100("WinJumplist.CreateIconFilesCount", icons_created);
+
+ // TODO(chengx): Remove the UMA histogram after fixing http://crbug.com/40407.
SCOPED_UMA_HISTOGRAM_TIMER("WinJumplist.UpdateJumpListDuration");
// Update the "Most Visited" category of the JumpList if it exists.
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698