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

Unified Diff: components/sync_sessions/sessions_sync_manager.cc

Issue 2868043003: Track task ids for navigations cross multiple tabs. (Closed)
Patch Set: fixing nits Created 3 years, 7 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 | components/sync_sessions/sessions_sync_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f985b3db1e34608ee6d25fbcfa61ec780fb92c79..271ea77e3028fda3ccabedeeb22f387c81c3a25a 100644
--- a/components/sync_sessions/sessions_sync_manager.cc
+++ b/components/sync_sessions/sessions_sync_manager.cc
@@ -499,9 +499,13 @@ void SessionsSyncManager::TrackTasks(
tab_specifics->current_navigation_index();
int64_t current_navigation_global_id =
tab_specifics->navigation(current_index_in_tab_specifics).global_id();
+ SessionID::id_type source_tab_id = tab_delegate->GetSourceTabID();
TabTasks* tab_tasks =
- task_tracker_->GetTabTasks(tab_delegate->GetSessionId());
+ source_tab_id == kInvalidTabID
+ ? task_tracker_->GetTabTasks(tab_delegate->GetSessionId())
+ : task_tracker_->GetTabTasks(tab_delegate->GetSessionId(),
+ source_tab_id);
tab_tasks->UpdateWithNavigation(
current_navigation_index,
tab_delegate->GetTransitionAtIndex(current_navigation_index),
« no previous file with comments | « no previous file | components/sync_sessions/sessions_sync_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698