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

Unified Diff: components/sync_sessions/synced_session_tracker.h

Issue 2791183003: [Sync] Restore previous session if no tabbed windows present (Closed)
Patch Set: Self review Created 3 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_tracker.h
diff --git a/components/sync_sessions/synced_session_tracker.h b/components/sync_sessions/synced_session_tracker.h
index 506d3d0cbeecb802b6aa39f9fc27f2d337de599f..f0324796f48eab6679a5f3789e0ebd206995287d 100644
--- a/components/sync_sessions/synced_session_tracker.h
+++ b/components/sync_sessions/synced_session_tracker.h
@@ -96,10 +96,15 @@ class SyncedSessionTracker {
// tabs not owned.
void ResetSessionTracking(const std::string& session_tag);
+ // Deletes those windows and tabs associated with |session_tag| that are no
+ // longer owned. See ResetSessionTracking(...)..
+ void CleanupSession(const std::string& session_tag);
+
// Adds the window with id |window_id| to the session specified by
// |session_tag|. If none existed for that session, creates one. Similarly, if
// the session did not exist yet, creates it. Ownership of the SessionWindow
// remains within the SyncedSessionTracker.
+ // Attempting to add a window to a session multiple times will have no effect.
void PutWindowInSession(const std::string& session_tag,
SessionID::id_type window_id);
@@ -145,10 +150,6 @@ class SyncedSessionTracker {
// Returns true if the session existed and was deleted, false otherwise.
bool DeleteForeignSession(const std::string& session_tag);
- // Deletes those windows and tabs associated with |session_tag| that are no
- // longer owned. See ResetSessionTracking(...)..
- void CleanupForeignSession(const std::string& session_tag);
-
// **** Methods specific to the local session. ****
// Set the local session tag. Must be called before any other local session

Powered by Google App Engine
This is Rietveld 408576698