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

Unified Diff: chrome/browser/jumplist_win.h

Issue 965503002: Filter out redundant jumplist updates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed from ui to browser category Created 5 years, 6 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/jumplist_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | chrome/browser/jumplist_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698