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

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

Issue 2859693002: Filter redundant JumpList favicons' fetching and related (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.cc » ('j') | chrome/browser/win/jumplist.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/win/jumplist.h
diff --git a/chrome/browser/win/jumplist.h b/chrome/browser/win/jumplist.h
index 975320ef416ee6fc56a8689f49952af6a382a82d..66ba8a6ee5e179ca4bc4b6258e8d10162a1bf00e 100644
--- a/chrome/browser/win/jumplist.h
+++ b/chrome/browser/win/jumplist.h
@@ -102,6 +102,10 @@ class JumpList : public sessions::TabRestoreServiceObserver,
// added or removed.
void TabRestoreServiceChanged(sessions::TabRestoreService* service) override;
+ // Called on a timer to update the "Recently Closed" category of JumpList
+ // after requests storms have subsided.
+ void DeferredTabRestoreServiceChanged();
+
// Observer callback to notice when our associated TabRestoreService
// is destroyed.
void TabRestoreServiceDestroyed(
@@ -155,28 +159,28 @@ class JumpList : public sessions::TabRestoreServiceObserver,
void OnFaviconDataAvailable(
const favicon_base::FaviconImageResult& image_result);
- // Callback for TopSites that notifies when the "Most
- // Visited" list is available. This function updates the ShellLinkItemList
- // objects and send another query that retrieves a favicon for each URL in
- // the list.
+ // Callback for TopSites that notifies when the "Most Visited" list is
+ // available. This function updates the ShellLinkItemList objects and sen
+ // another query that retrieves a favicon for each URL in the list.
void OnMostVisitedURLsAvailable(
const history::MostVisitedURLList& data);
// Callback for changes to the incognito mode availability pref.
void OnIncognitoAvailabilityChanged();
- // Helper for RunUpdate() that determines its parameters.
+ // Posts tasks to update the JumpList and delete any obsolete JumpList related
+ // folders.
void PostRunUpdate();
- // Called on a timer to invoke RunUpdateJumpList() after
- // requests storms have subsided.
- void DeferredRunUpdate();
-
// history::TopSitesObserver implementation.
void TopSitesLoaded(history::TopSites* top_sites) override;
void TopSitesChanged(history::TopSites* top_sites,
ChangeReason change_reason) override;
+ // Called on a timer to update the most visited URLs after requests storms
+ // have subsided.
+ void DeferredTopSitesChanged(history::TopSites* top_sites);
+
// Tracks FaviconService tasks.
base::CancelableTaskTracker cancelable_task_tracker_;
@@ -192,8 +196,13 @@ class JumpList : public sessions::TabRestoreServiceObserver,
// The directory which contains JumpList icons.
base::FilePath icon_dir_;
- // Timer for requesting delayed updates of the jumplist.
- base::OneShotTimer timer_;
+ // Timer for requesting delayed updates of the "Most Visited" category of
+ // jumplist.
+ base::OneShotTimer timer_most_visited_;
+
+ // Timer for requesting delayed updates of the "Recently Closed" category of
+ // jumplist.
+ base::OneShotTimer timer_recently_closed_;
// Holds data that can be accessed from multiple threads.
scoped_refptr<base::RefCountedData<JumpListData>> jumplist_data_;
« no previous file with comments | « no previous file | chrome/browser/win/jumplist.cc » ('j') | chrome/browser/win/jumplist.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698