| 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.
|
|
|