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

Unified Diff: components/sync_sessions/synced_session.h

Issue 1877083002: [Sync] Moved tab_node_id tracking to session object and improved foreign session garbage collection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved tab_node_ids to session object, resumed aggressive cleanup. Created 4 years, 8 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
Index: components/sync_sessions/synced_session.h
diff --git a/components/sync_sessions/synced_session.h b/components/sync_sessions/synced_session.h
index 5e9d7ba48fc902a6b19aed4cdb01e9edd7c99dd4..7c30ec53f1d5653cdab5cff4225827ca84e055af 100644
--- a/components/sync_sessions/synced_session.h
+++ b/components/sync_sessions/synced_session.h
@@ -6,6 +6,7 @@
#define COMPONENTS_SYNC_SESSIONS_SYNCED_SESSION_H_
#include <map>
+#include <set>
#include <string>
#include "base/macros.h"
@@ -51,13 +52,19 @@ struct SyncedSession {
// Type of device this session is from.
DeviceType device_type;
- // Last time this session was modified remotely.
+ // Last time this session was modified remotely. This is the max of the header
+ // and all children tab mtimes.
base::Time modified_time;
// Map of windows that make up this session. Windowws are owned by the session
// itself and free'd on destruction.
SyncedWindowMap windows;
+ // All of the known to be valid tab node ids associated with this session.
+ // This is not stored in the header, but rather assembled for all tabs, both
+ // parented and orphaned.
+ std::set<int> tab_node_ids;
+
// Converts the DeviceType enum value to a string. This is used
// in the NTP handler for foreign sessions for matching session
// types to an icon style.

Powered by Google App Engine
This is Rietveld 408576698