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); |