diff options
author | dfalcantara@chromium.org <dfalcantara@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-18 01:47:53 +0000 |
---|---|---|
committer | dfalcantara@chromium.org <dfalcantara@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-18 01:47:53 +0000 |
commit | 8d0f331b0a7b37e22b4d0233b799f06f86086625 (patch) | |
tree | dd65306941f23446449823c22201ffa607956704 /chrome/browser/sessions/tab_restore_service.cc | |
parent | 44ce9951d38958c31a5cf42f233d28444df4eb4e (diff) | |
download | chromium_src-8d0f331b0a7b37e22b4d0233b799f06f86086625.zip chromium_src-8d0f331b0a7b37e22b4d0233b799f06f86086625.tar.gz chromium_src-8d0f331b0a7b37e22b4d0233b799f06f86086625.tar.bz2 |
Fix user agent override restoration pipeline
There were some disconnects in the pipeline that prevented the user agent override
string from being saved and restored from the temporary tab structions in sessions/,
but couldn't be tested on Android because the pathways weren't being exercised in
the same way. This CL finishes hooking it up for ChromeOS (and presumably the other
platforms).
BUG=140600
Review URL: https://chromiumcodereview.appspot.com/10827168
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152207 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sessions/tab_restore_service.cc')
-rw-r--r-- | chrome/browser/sessions/tab_restore_service.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/chrome/browser/sessions/tab_restore_service.cc b/chrome/browser/sessions/tab_restore_service.cc index 9d9e0ed..d66cc8c 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(); + // TODO(ajwong): This does not correctly handle storage for isolated apps. tab->session_storage_namespace = controller->GetDefaultSessionStorageNamespace(); @@ -997,7 +1001,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()) @@ -1031,7 +1036,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); |