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

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

Issue 2824103003: Various logical fixes for jumplist (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 | chrome/browser/win/jumplist_file_util.h » ('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 18c7922985a23dc0bba9772451dac6d68cd0b335..461c5a4a45b5371c7c64ff66d79060b35a5c7bdd 100644
--- a/chrome/browser/win/jumplist.cc
+++ b/chrome/browser/win/jumplist.cc
@@ -196,6 +196,8 @@ bool UpdateJumpList(const wchar_t* app_id,
// and 40% to "recently-closed" items, respectively.
// Nevertheless, if there are not so many items in |recently_closed_pages|,
// we give the remaining slots to "most-visited" items.
+ // The default maximum number of items to display in JumpList is 10.
+ // https://msdn.microsoft.com/en-us/library/windows/desktop/dd378398(v=vs.85).aspx
const int kMostVisited = 60;
const int kRecentlyClosed = 40;
const int kTotal = kMostVisited + kRecentlyClosed;
@@ -208,6 +210,9 @@ bool UpdateJumpList(const wchar_t* app_id,
recently_closed_items = recently_closed_pages.size();
}
+ // Delete the content in JumpListIcons folder and log the results to UMA.
+ DeleteDirectoryContentAndLogResults(icon_dir, kFileDeleteLimit);
+
// If JumpListIcons directory doesn't exist (we have tried to create it
// already) or is not empty, skip updating the jumplist icons. The jumplist
// links should be updated anyway, as it doesn't involve disk IO. In this
@@ -277,9 +282,6 @@ void RunUpdateJumpList(IncognitoModePrefs::Availability incognito_availability,
local_recently_closed_pages = data->recently_closed_pages_;
}
- // Delete the content in JumpListIcons folder and log the results to UMA.
- DeleteDirectoryContentAndLogResults(icon_dir, kFileDeleteLimit);
-
// Create a new JumpList and replace the current JumpList with it. The
// jumplist links are updated anyway, while the jumplist icons may not as
// mentioned above.
« no previous file with comments | « no previous file | chrome/browser/win/jumplist_file_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698