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

Unified Diff: chrome/browser/sync/sessions2/sessions_sync_manager.h

Issue 81923003: sync: add garbage collection to SessionsSyncManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: undo last upload Created 7 years 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 | « chrome/browser/sync/profile_sync_service.cc ('k') | chrome/browser/sync/sessions2/sessions_sync_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/sessions2/sessions_sync_manager.h
diff --git a/chrome/browser/sync/sessions2/sessions_sync_manager.h b/chrome/browser/sync/sessions2/sessions_sync_manager.h
index 8ba12610021c4f463734faf325fddaa626d7883f..366de05a7e64690a0da426e4fb3ff0393e27bdc2 100644
--- a/chrome/browser/sync/sessions2/sessions_sync_manager.h
+++ b/chrome/browser/sync/sessions2/sessions_sync_manager.h
@@ -145,6 +145,12 @@ class SessionsSyncManager : public syncer::SyncableService,
FaviconCache* GetFaviconCache();
+ // Triggers garbage collection of stale sessions (as defined by
+ // |stale_session_threshold_days_|). This is called automatically every
+ // time we start up (via AssociateModels) and when new sessions data is
+ // downloaded (sync cycles complete).
+ void DoGarbageCollection();
+
private:
// Keep all the links to local tab data in one place. A tab_node_id and tab
// must be passed at creation. The tab_node_id is not mutable, although
@@ -329,6 +335,10 @@ class SessionsSyncManager : public syncer::SyncableService,
// client.
int local_session_header_node_id_;
+ // Number of days without activity after which we consider a session to be
+ // stale and a candidate for garbage collection.
+ size_t stale_session_threshold_days_;
+
scoped_ptr<LocalSessionEventRouter> local_event_router_;
DISALLOW_COPY_AND_ASSIGN(SessionsSyncManager);
« no previous file with comments | « chrome/browser/sync/profile_sync_service.cc ('k') | chrome/browser/sync/sessions2/sessions_sync_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698