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

Unified Diff: chrome/browser/ui/browser.cc

Issue 7448012: Create the correct SiteInstance when restoring tabs that belong to apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix style. Created 9 years, 5 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 | « chrome/browser/tab_contents/tab_util.cc ('k') | chrome/browser/ui/browser_navigator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index be90b942982244963ae8490c68538d3bdb27e199..c015dea48af71e0cefe88108f3150a2f9325d6e6 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -69,6 +69,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"
@@ -1152,7 +1153,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();
+ TabContentsWrapper* wrapper = TabContentsFactory(
+ profile(),
+ tab_util::GetSiteInstanceForNewTab(NULL, profile_, restore_url),
MSG_ROUTING_NONE,
GetSelectedTabContents(),
session_storage_namespace);
@@ -1198,7 +1202,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();
+ TabContentsWrapper* wrapper = TabContentsFactory(
+ profile(),
+ tab_util::GetSiteInstanceForNewTab(NULL, profile_, restore_url),
MSG_ROUTING_NONE,
GetSelectedTabContents(),
session_storage_namespace);
« no previous file with comments | « chrome/browser/tab_contents/tab_util.cc ('k') | chrome/browser/ui/browser_navigator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698