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

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

Issue 2811393002: Log UpdateJumpList() and CreateIconFiles() execution time to UMA (Closed)
Patch Set: Merge branch 'master' of https://chromium.googlesource.com/chromium/src into lookintoupdatejumplist 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 d9122ccf78368e3f2cee740e0cc53e2616ce8d64..96fe9d399775c45b81e874a9ee812f7519dd513d 100644
--- a/chrome/browser/win/jumplist.cc
+++ b/chrome/browser/win/jumplist.cc
@@ -121,6 +121,9 @@ bool CreateIconFile(const gfx::ImageSkia& image_skia,
// loaded icons.
void CreateIconFiles(const base::FilePath& icon_dir,
const ShellLinkItemList& item_list) {
+ // TODO(chengx): Remove the UMA histogram after fixing http://crbug.com/40407.
+ SCOPED_UMA_HISTOGRAM_TIMER("WinJumplist.CreateIconFilesDuration");
+
for (ShellLinkItemList::const_iterator item = item_list.begin();
item != item_list.end(); ++item) {
base::FilePath icon_path;
@@ -177,6 +180,9 @@ bool UpdateJumpList(const wchar_t* app_id,
const ShellLinkItemList& most_visited_pages,
const ShellLinkItemList& recently_closed_pages,
IncognitoModePrefs::Availability incognito_availability) {
+ // TODO(chengx): Remove the UMA histogram after fixing http://crbug.com/40407.
+ SCOPED_UMA_HISTOGRAM_TIMER("WinJumplist.UpdateJumpListDuration");
+
// JumpList is implemented only on Windows 7 or later.
// So, we should return now when this function is called on earlier versions
// of Windows.
@@ -255,6 +261,12 @@ void RunUpdateJumpList(IncognitoModePrefs::Availability incognito_availability,
// jumplist icons. The jumplist links should be updated anyway, as it doesn't
// involve disk IO.
if (base::DirectoryExists(icon_dir) && base::IsDirectoryEmpty(icon_dir)) {
+ // TODO(chengx): Remove the UMA histogram after fixing
+ // http://crbug.com/40407.
+ UMA_HISTOGRAM_COUNTS_100(
+ "WinJumplist.CreateIconFilesCount",
+ local_most_visited_pages.size() + local_recently_closed_pages.size());
+
// Create icon files for shortcuts in the "Most Visited" category.
CreateIconFiles(icon_dir, local_most_visited_pages);
« 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