Index: chrome/browser/sessions/tab_restore_service.cc |
diff --git a/chrome/browser/sessions/tab_restore_service.cc b/chrome/browser/sessions/tab_restore_service.cc |
index 66e9e15fef2a36e1eb8da82e029e7a747790299b..fe16f64bc97fe64f79f822aeb02c792d57eee689 100644 |
--- a/chrome/browser/sessions/tab_restore_service.cc |
+++ b/chrome/browser/sessions/tab_restore_service.cc |
@@ -379,7 +379,8 @@ void TabRestoreService::RestoreEntryById(TabRestoreServiceDelegate* delegate, |
static_cast<int>(tab_i) == |
window->selected_tab_index, |
tab.pinned, tab.from_last_session, |
- tab.session_storage_namespace); |
+ tab.session_storage_namespace, |
+ tab.user_agent_override); |
if (restored_tab) { |
restored_tab->GetController().LoadIfNecessary(); |
RecordAppLaunch(profile(), tab); |
@@ -546,6 +547,9 @@ void TabRestoreService::PopulateTab(Tab* tab, |
tab->extension_app_id = extension->id(); |
} |
+ tab->user_agent_override = |
+ controller->GetWebContents()->GetUserAgentOverride(); |
+ |
tab->session_storage_namespace = controller->GetSessionStorageNamespace(); |
// Delegate may be NULL during unit tests. |
@@ -995,7 +999,8 @@ TabRestoreServiceDelegate* TabRestoreService::RestoreTab( |
tab.current_navigation_index, |
tab.from_last_session, |
tab.extension_app_id, |
- tab.session_storage_namespace); |
+ tab.session_storage_namespace, |
+ tab.user_agent_override); |
} else { |
// We only respsect the tab's original browser if there's no disposition. |
if (disposition == UNKNOWN && tab.has_browser()) |
@@ -1029,7 +1034,8 @@ TabRestoreServiceDelegate* TabRestoreService::RestoreTab( |
disposition != NEW_BACKGROUND_TAB, |
tab.pinned, |
tab.from_last_session, |
- tab.session_storage_namespace); |
+ tab.session_storage_namespace, |
+ tab.user_agent_override); |
web_contents->GetController().LoadIfNecessary(); |
} |
RecordAppLaunch(profile(), tab); |