Chromium Code Reviews| 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. |