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

Unified Diff: chrome/browser/sync/glue/session_sync_test_helper.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: Fixing comment for zea. 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
« no previous file with comments | « no previous file | chrome/browser/sync/glue/session_sync_test_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/glue/session_sync_test_helper.h
diff --git a/chrome/browser/sync/glue/session_sync_test_helper.h b/chrome/browser/sync/glue/session_sync_test_helper.h
index 64a76c84775ef8ca7c1de2cd57ceebe53e577b69..f4055c050c1f2bf96bd02fe02b664b8bad31ad6c 100644
--- a/chrome/browser/sync/glue/session_sync_test_helper.h
+++ b/chrome/browser/sync/glue/session_sync_test_helper.h
@@ -37,11 +37,22 @@ class SessionSyncTestHelper {
const std::vector<std::vector<SessionID::id_type>>& windows,
const sync_driver::SyncedSession& session);
+ // Build a SessionSpecifics object with a tab and sample data. Uses a
+ // monotonically increasing variable to generate tab_node_ids and avoid
+ // conflicts.
void BuildTabSpecifics(const std::string& tag,
int window_id,
int tab_id,
sync_pb::SessionSpecifics* tab_base);
+ // Overload of BuildTabSpecifics to allow forcing a specific tab_node_id.
+ // Typically only useful to test reusing tab_node_ids.
+ void BuildTabSpecifics(const std::string& tag,
+ int window_id,
+ int tab_id,
+ int tab_node_id,
+ sync_pb::SessionSpecifics* tab_base);
+
sync_pb::SessionSpecifics BuildForeignSession(
const std::string& tag,
const std::vector<SessionID::id_type>& tab_list,
« no previous file with comments | « no previous file | chrome/browser/sync/glue/session_sync_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698