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

Unified Diff: chrome/browser/sync/glue/session_model_associator.h

Issue 16421003: [Sync] Add logic to reassociate tab nodes after restart. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit. Created 7 years, 6 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 | « chrome/browser/android/tab_android.h ('k') | chrome/browser/sync/glue/session_model_associator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/glue/session_model_associator.h
diff --git a/chrome/browser/sync/glue/session_model_associator.h b/chrome/browser/sync/glue/session_model_associator.h
index 615a1d1d7d505f4a428999d6c0ba8c033681b3dd..47626de4967754bcc0755764c5a6c73b0b94cfe6 100644
--- a/chrome/browser/sync/glue/session_model_associator.h
+++ b/chrome/browser/sync/glue/session_model_associator.h
@@ -108,10 +108,10 @@ class SessionModelAssociator
// Reassociates a single tab with the sync model. Will check if the tab
// already is associated with a sync node and allocate one if necessary.
// |error| gets set if any association error occurred.
+ // |tab| will be updated with sync id if necessary.
// Returns: false if the local session's sync nodes were deleted and
// reassociation is necessary, true otherwise.
- bool AssociateTab(const SyncedTabDelegate& tab,
- syncer::SyncError* error);
+ bool AssociateTab(SyncedTabDelegate* const tab, syncer::SyncError* error);
// Load any foreign session info stored in sync db and update the sync db
// with local client data. Processes/reuses any sync nodes owned by this
@@ -329,6 +329,9 @@ class SessionModelAssociator
// invalid url's.
bool TabHasValidEntry(const SyncedTabDelegate& tab) const;
+ // Update the tab id of the node associated with |sync_id| to |new_tab_id|.
+ void UpdateTabIdIfNecessary(int64 sync_id, SessionID::id_type new_tab_id);
+
// For testing only.
void QuitLoopForSubtleTesting();
« no previous file with comments | « chrome/browser/android/tab_android.h ('k') | chrome/browser/sync/glue/session_model_associator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698