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

Side by Side Diff: components/sync_sessions/sessions_sync_manager.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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_SYNC_SESSIONS_SESSIONS_SYNC_MANAGER_H_ 5 #ifndef COMPONENTS_SYNC_SESSIONS_SESSIONS_SYNC_MANAGER_H_
6 #define COMPONENTS_SYNC_SESSIONS_SESSIONS_SYNC_MANAGER_H_ 6 #define COMPONENTS_SYNC_SESSIONS_SESSIONS_SYNC_MANAGER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest, PopulateSessionWindow); 153 FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest, PopulateSessionWindow);
154 FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest, ValidTabs); 154 FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest, ValidTabs);
155 FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest, SetSessionTabFromDelegate); 155 FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest, SetSessionTabFromDelegate);
156 FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest, 156 FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest,
157 SetSessionTabFromDelegateNavigationIndex); 157 SetSessionTabFromDelegateNavigationIndex);
158 FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest, 158 FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest,
159 SetSessionTabFromDelegateCurrentInvalid); 159 SetSessionTabFromDelegateCurrentInvalid);
160 FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest, BlockedNavigations); 160 FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest, BlockedNavigations);
161 FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest, DeleteForeignSession); 161 FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest, DeleteForeignSession);
162 FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest, 162 FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest,
163 ProcessForeignDeleteTabsWithShadowing);
164 FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest,
165 ProcessForeignDeleteTabsWithReusedNodeIds);
166 FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest,
163 SaveUnassociatedNodesForReassociation); 167 SaveUnassociatedNodesForReassociation);
164 FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest, MergeDeletesCorruptNode); 168 FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest, MergeDeletesCorruptNode);
165 FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest, 169 FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest,
166 MergeLocalSessionExistingTabs); 170 MergeLocalSessionExistingTabs);
167 FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest, 171 FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest,
168 CheckPrerenderedWebContentsSwap); 172 CheckPrerenderedWebContentsSwap);
169 FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest, 173 FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest,
170 AssociateWindowsDontReloadTabs); 174 AssociateWindowsDontReloadTabs);
171 FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest, SwappedOutOnRestore); 175 FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest, SwappedOutOnRestore);
172 FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest, 176 FRIEND_TEST_ALL_PREFIXES(SessionsSyncManagerTest,
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 339
336 // User-visible machine name. 340 // User-visible machine name.
337 std::string current_session_name_; 341 std::string current_session_name_;
338 342
339 // SyncID for the sync node containing all the window information for this 343 // SyncID for the sync node containing all the window information for this
340 // client. 344 // client.
341 int local_session_header_node_id_; 345 int local_session_header_node_id_;
342 346
343 // Number of days without activity after which we consider a session to be 347 // Number of days without activity after which we consider a session to be
344 // stale and a candidate for garbage collection. 348 // stale and a candidate for garbage collection.
345 size_t stale_session_threshold_days_; 349 int stale_session_threshold_days_;
346 350
347 scoped_ptr<LocalSessionEventRouter> local_event_router_; 351 scoped_ptr<LocalSessionEventRouter> local_event_router_;
348 352
349 // Owns revisiting instrumentation logic for page visit events. 353 // Owns revisiting instrumentation logic for page visit events.
350 PageRevisitBroadcaster page_revisit_broadcaster_; 354 PageRevisitBroadcaster page_revisit_broadcaster_;
351 355
352 // Callback to inform interested observer that new sessions data has arrived. 356 // Callback to inform interested observer that new sessions data has arrived.
353 base::Closure sessions_updated_callback_; 357 base::Closure sessions_updated_callback_;
354 358
355 // Callback to inform sync that a sync data refresh is requested. 359 // Callback to inform sync that a sync data refresh is requested.
356 base::Closure datatype_refresh_callback_; 360 base::Closure datatype_refresh_callback_;
357 361
358 DISALLOW_COPY_AND_ASSIGN(SessionsSyncManager); 362 DISALLOW_COPY_AND_ASSIGN(SessionsSyncManager);
359 }; 363 };
360 364
361 } // namespace browser_sync 365 } // namespace browser_sync
362 366
363 #endif // COMPONENTS_SYNC_SESSIONS_SESSIONS_SYNC_MANAGER_H_ 367 #endif // COMPONENTS_SYNC_SESSIONS_SESSIONS_SYNC_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/sessions/sessions_sync_manager_unittest.cc ('k') | components/sync_sessions/sessions_sync_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698