Index: chrome/browser/jumplist_win.h |
diff --git a/chrome/browser/jumplist_win.h b/chrome/browser/jumplist_win.h |
index 72b6d02a7cb1d3281ce4f45783708b318527b99c..1c69165960381c532b5a38282b80af3f973b4504 100644 |
--- a/chrome/browser/jumplist_win.h |
+++ b/chrome/browser/jumplist_win.h |
@@ -14,6 +14,7 @@ |
#include "base/memory/weak_ptr.h" |
#include "base/synchronization/lock.h" |
#include "base/task/cancelable_task_tracker.h" |
+#include "base/timer/timer.h" |
#include "chrome/browser/jumplist_updater_win.h" |
#include "chrome/browser/prefs/incognito_mode_prefs.h" |
#include "chrome/browser/sessions/tab_restore_service.h" |
@@ -125,6 +126,10 @@ class JumpList : public TabRestoreServiceObserver, |
// Helper for RunUpdate() that determines its parameters. |
void PostRunUpdate(); |
+ // Called on a timer to invoke RunUpdateOnFileThread() after requests storms |
+ // have subsided. |
+ void DeferredRunUpdate(); |
+ |
// Runnable method that updates the jumplist, once all the data |
// has been fetched. |
void RunUpdateOnFileThread( |
@@ -162,6 +167,9 @@ class JumpList : public TabRestoreServiceObserver, |
// protected by the list_lock_. |
ShellLinkItemList recently_closed_pages_; |
+ // Timer for requesting delayed updates of the jumplist. |
+ base::OneShotTimer<JumpList> timer_; |
+ |
// A list of URLs we need to retrieve their favicons, |
// protected by the list_lock_. |
typedef std::pair<std::string, scoped_refptr<ShellLinkItem> > URLPair; |