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

Unified Diff: chrome/browser/sessions/tab_restore_service_helper.cc

Issue 15055003: Do not submit: high level overview patch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix build. Created 7 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
Index: chrome/browser/sessions/tab_restore_service_helper.cc
diff --git a/chrome/browser/sessions/tab_restore_service_helper.cc b/chrome/browser/sessions/tab_restore_service_helper.cc
index 32e3406a6ae63c7cc0add06047f5e3b277da0983..47c2c8fbca0b03b47cb5520a069f2c5de2387864 100644
--- a/chrome/browser/sessions/tab_restore_service_helper.cc
+++ b/chrome/browser/sessions/tab_restore_service_helper.cc
@@ -234,15 +234,17 @@ void TabRestoreServiceHelper::RestoreEntryById(
window->app_name);
for (size_t tab_i = 0; tab_i < window->tabs.size(); ++tab_i) {
const Tab& tab = window->tabs[tab_i];
- WebContents* restored_tab =
- delegate->AddRestoredTab(tab.navigations, delegate->GetTabCount(),
- tab.current_navigation_index,
- tab.extension_app_id,
- static_cast<int>(tab_i) ==
- window->selected_tab_index,
- tab.pinned, tab.from_last_session,
- tab.session_storage_namespace,
- tab.user_agent_override);
+ WebContents* restored_tab = delegate->AddRestoredTab(
+ tab.navigations,
+ delegate->GetTabCount(),
+ tab.current_navigation_index,
+ tab.extension_app_id,
+ static_cast<int>(tab_i) == window->selected_tab_index,
+ tab.pinned,
+ tab.from_last_session,
+ tab.session_storage_namespace,
+ tab.user_agent_override,
+ tab.sync_session_id);
if (restored_tab) {
restored_tab->GetController().LoadIfNecessary();
RecordAppLaunch(profile_, tab);
@@ -399,6 +401,7 @@ void TabRestoreServiceHelper::PopulateTab(
if (tab->current_navigation_index == -1 && entry_count > 0)
tab->current_navigation_index = 0;
tab->tabstrip_index = index;
+ tab->sync_session_id = tab->sync_session_id;
extensions::TabHelper* extensions_tab_helper =
extensions::TabHelper::FromWebContents(controller->GetWebContents());
@@ -435,7 +438,8 @@ TabRestoreServiceDelegate* TabRestoreServiceHelper::RestoreTab(
tab.from_last_session,
tab.extension_app_id,
tab.session_storage_namespace,
- tab.user_agent_override);
+ tab.user_agent_override,
+ tab.sync_session_id);
} else {
// We only respsect the tab's original browser if there's no disposition.
if (disposition == UNKNOWN && tab.has_browser()) {
@@ -464,16 +468,17 @@ TabRestoreServiceDelegate* TabRestoreServiceHelper::RestoreTab(
tab_index = delegate->GetTabCount();
}
- WebContents* web_contents = delegate->AddRestoredTab(
- tab.navigations,
- tab_index,
- tab.current_navigation_index,
- tab.extension_app_id,
- disposition != NEW_BACKGROUND_TAB,
- tab.pinned,
- tab.from_last_session,
- tab.session_storage_namespace,
- tab.user_agent_override);
+ WebContents* web_contents =
+ delegate->AddRestoredTab(tab.navigations,
+ tab_index,
+ tab.current_navigation_index,
+ tab.extension_app_id,
+ disposition != NEW_BACKGROUND_TAB,
+ tab.pinned,
+ tab.from_last_session,
+ tab.session_storage_namespace,
+ tab.user_agent_override,
+ tab.sync_session_id);
web_contents->GetController().LoadIfNecessary();
}
RecordAppLaunch(profile_, tab);

Powered by Google App Engine
This is Rietveld 408576698