Chromium Code Reviews| Index: chrome/browser/win/jumplist.h |
| diff --git a/chrome/browser/win/jumplist.h b/chrome/browser/win/jumplist.h |
| index 975320ef416ee6fc56a8689f49952af6a382a82d..82444f7c16b1c5ec96f6fabec37cd5ce4f78c653 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 |
|
grt (UTC plus 2)
2017/05/04 11:32:43
nit: it's generally nice to group overrides togeth
chengx
2017/05/04 20:48:04
Done.
|
| + // 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 |
|
grt (UTC plus 2)
2017/05/04 11:32:43
"...and sen" -> "...and begins the process of fetc
chengx
2017/05/04 20:48:04
Done.
|
| + // 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(); |
| + |
| // 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_; |