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

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

Issue 2848763002: Re-enable UMA metric WinJumplist.CreateIconFilesCount (Closed)
Patch Set: Fix comment. 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..53ec4f44b3a9aadb793d786a5afa390d595d5ff7 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 desired number of icons to create in this JumpList update.
+ int icons_to_create = 0;
+
if (most_visited_pages_have_updates) {
// Delete the content in JumpListIconsMostVisited folder and log the results
// to UMA.
@@ -259,6 +262,9 @@ 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_to_create +=
+ std::min(most_visited_pages.size(), most_visited_items);
}
}
@@ -276,10 +282,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_to_create +=
+ 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_to_create);
+
+ // 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