Index: chrome/browser/ui/browser.cc |
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc |
index 34c7cdd9e223c36e2173be01bb023ce2e25254ae..32fc1e3d3e4cbd43c448a2afea70791187af17ba 100644 |
--- a/chrome/browser/ui/browser.cc |
+++ b/chrome/browser/ui/browser.cc |
@@ -67,6 +67,7 @@ |
#include "chrome/browser/tab_closeable_state_watcher.h" |
#include "chrome/browser/tab_contents/background_contents.h" |
#include "chrome/browser/tab_contents/simple_alert_infobar_delegate.h" |
+#include "chrome/browser/tab_contents/tab_util.h" |
#include "chrome/browser/tabs/tab_finder.h" |
#include "chrome/browser/tabs/tab_strip_model.h" |
#include "chrome/browser/themes/theme_service.h" |
@@ -92,6 +93,7 @@ |
#include "chrome/browser/ui/tabs/tab_menu_model.h" |
#include "chrome/browser/ui/web_applications/web_app_ui.h" |
#include "chrome/browser/ui/webui/bug_report_ui.h" |
+#include "chrome/browser/ui/webui/chrome_web_ui_factory.h" |
Charlie Reis
2011/07/19 21:38:28
Is this needed?
|
#include "chrome/browser/ui/webui/options/content_settings_handler.h" |
#include "chrome/browser/ui/window_sizer.h" |
#include "chrome/browser/upgrade_detector.h" |
@@ -1152,7 +1154,10 @@ TabContents* Browser::AddRestoredTab( |
bool pin, |
bool from_last_session, |
SessionStorageNamespace* session_storage_namespace) { |
- TabContentsWrapper* wrapper = TabContentsFactory(profile(), NULL, |
+ GURL restore_url = navigations.at(selected_navigation).virtual_url(); |
Charlie Reis
2011/07/19 21:38:28
Sanity check: do we know this index is safe?
|
+ TabContentsWrapper* wrapper = TabContentsFactory( |
+ profile(), |
+ tab_util::GetSiteInstance(NULL, profile_, restore_url), |
MSG_ROUTING_NONE, |
GetSelectedTabContents(), |
session_storage_namespace); |
@@ -1198,7 +1203,10 @@ void Browser::ReplaceRestoredTab( |
bool from_last_session, |
const std::string& extension_app_id, |
SessionStorageNamespace* session_storage_namespace) { |
- TabContentsWrapper* wrapper = TabContentsFactory(profile(), NULL, |
+ GURL restore_url = navigations.at(selected_navigation).virtual_url(); |
Charlie Reis
2011/07/19 21:38:28
Ditto.
|
+ TabContentsWrapper* wrapper = TabContentsFactory( |
+ profile(), |
+ tab_util::GetSiteInstance(NULL, profile_, restore_url), |
MSG_ROUTING_NONE, |
GetSelectedTabContents(), |
session_storage_namespace); |