Index: chrome/browser/win/jumplist.h |
diff --git a/chrome/browser/win/jumplist.h b/chrome/browser/win/jumplist.h |
index 95479cc8d5a2daddbefd7bfb2a02ad1a3c909549..e35050e3026ebe20737c8e7e420d03ca0f3da9af 100644 |
--- a/chrome/browser/win/jumplist.h |
+++ b/chrome/browser/win/jumplist.h |
@@ -170,6 +170,12 @@ class JumpList : public sessions::TabRestoreServiceObserver, |
void TopSitesChanged(history::TopSites* top_sites, |
ChangeReason change_reason) override; |
+ // Checks if the timeout flag |jumplist_updater_timeout_| is true and updates |
+ // the flag and |cancelled_update_count_| accordingly. |
+ // Returns true if |jumplist_updater_timeout_| is still true after being |
+ // updated. |
+ bool CheckAndUpdateTimeoutInfo(); |
+ |
// Called on a timer to update the most visited URLs after requests storms |
// have subsided. |
void DeferredTopSitesChanged(); |
@@ -232,6 +238,15 @@ class JumpList : public sessions::TabRestoreServiceObserver, |
// jumplist. |
base::OneShotTimer timer_recently_closed_; |
+ // The number of jumplist updates cancelled intentionally due to jumplist |
+ // updater timeout. |
+ int cancelled_update_count_; |
gab
2017/05/12 17:58:47
Initialize member inline here instead of in constr
chengx
2017/05/12 18:53:38
Done.
|
+ |
+ // A boolean flag indicating if there's a timeout in jumplist updater. This |
+ // flag will be cleared after the following |kCancelledUpdates| jumplist |
+ // updates are cancelled intentionally. |
+ bool jumplist_updater_timeout_; |
gab
2017/05/12 17:58:47
Actually you don't need the bool, you can do this
chengx
2017/05/12 18:53:38
Agreed. I've updated the logic in the new patch se
|
+ |
// Holds data that can be accessed from multiple threads. |
scoped_refptr<base::RefCountedData<JumpListData>> jumplist_data_; |