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

Unified Diff: components/sync_sessions/sessions_sync_manager.cc

Issue 2562853002: [Sync] Fix flakiness from Sessions refactor (Closed)
Patch Set: Fix SetSyncId Created 4 years 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/sessions_sync_manager.cc
diff --git a/components/sync_sessions/sessions_sync_manager.cc b/components/sync_sessions/sessions_sync_manager.cc
index 9c55aa82930b71b42117da772b4e128e5ad510be..ac51474953b1c6027397f6209c768b4fb4fdd457 100644
--- a/components/sync_sessions/sessions_sync_manager.cc
+++ b/components/sync_sessions/sessions_sync_manager.cc
@@ -367,6 +367,7 @@ void SessionsSyncManager::AssociateTab(SyncedTabDelegate* const tab_delegate,
bool existing_tab_node =
session_tracker_.GetTabNodeForLocalTab(tab_id, &tab_node_id);
DCHECK_NE(TabNodePool::kInvalidTabNodeID, tab_node_id);
+ tab_delegate->SetSyncId(tab_node_id);
skym 2016/12/09 15:40:00 I can't seem to find anywhere that reads this valu
Nicolas Zea 2016/12/09 17:33:36 Correct, we only use it for placeholders today (al
sessions::SessionTab* session_tab =
session_tracker_.GetTab(current_machine_tag(), tab_id);
@@ -766,9 +767,10 @@ void SessionsSyncManager::UpdateTrackerWithSpecifics(
// In both cases, we can safely throw it into the set of node ids.
session_tracker_.OnTabNodeSeen(session_tag, specifics.tab_node_id());
sessions::SessionTab* tab = session_tracker_.GetTab(session_tag, tab_id);
- if (tab->timestamp > modification_time) {
+ if (!tab->timestamp.is_null() && tab->timestamp > modification_time) {
DVLOG(1) << "Ignoring " << session_tag << "'s session tab " << tab_id
- << " with earlier modification time";
+ << " with earlier modification time: " << tab->timestamp
+ << " vs " << modification_time;
return;
}

Powered by Google App Engine
This is Rietveld 408576698