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

Unified Diff: chrome/browser/browser.cc

Issue 341043: Changes session restore to use a normal load rather than preferring... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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/browser.h ('k') | chrome/browser/renderer_host/render_view_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser.cc
===================================================================
--- chrome/browser/browser.cc (revision 30525)
+++ chrome/browser/browser.cc (working copy)
@@ -590,10 +590,12 @@
int tab_index,
int selected_navigation,
bool select,
- bool pin) {
+ bool pin,
+ bool from_last_session) {
TabContents* new_tab = new TabContents(profile(), NULL,
MSG_ROUTING_NONE, tabstrip_model_.GetSelectedTabContents());
- new_tab->controller().RestoreFromState(navigations, selected_navigation);
+ new_tab->controller().RestoreFromState(navigations, selected_navigation,
+ from_last_session);
bool really_pin =
(pin && tab_index == tabstrip_model()->IndexOfFirstNonPinnedTab());
@@ -612,10 +614,12 @@
void Browser::ReplaceRestoredTab(
const std::vector<TabNavigation>& navigations,
- int selected_navigation) {
+ int selected_navigation,
+ bool from_last_session) {
TabContents* replacement = new TabContents(profile(), NULL,
MSG_ROUTING_NONE, tabstrip_model_.GetSelectedTabContents());
- replacement->controller().RestoreFromState(navigations, selected_navigation);
+ replacement->controller().RestoreFromState(navigations, selected_navigation,
+ from_last_session);
tabstrip_model_.ReplaceNavigationControllerAt(
tabstrip_model_.selected_index(),
@@ -2629,26 +2633,6 @@
}
}
-TabContents* Browser::BuildRestoredTab(
- const std::vector<TabNavigation>& navigations,
- int selected_navigation) {
- if (!navigations.empty()) {
- DCHECK(selected_navigation >= 0 &&
- selected_navigation < static_cast<int>(navigations.size()));
- // Create a NavigationController. This constructor creates the appropriate
- // set of TabContents.
- TabContents* new_tab = new TabContents(profile_, NULL,
- MSG_ROUTING_NONE, tabstrip_model_.GetSelectedTabContents());
- new_tab->controller().RestoreFromState(navigations, selected_navigation);
- return new_tab;
- } else {
- // No navigations. Create a tab with about:blank.
- return CreateTabContentsForURL(GURL(chrome::kAboutBlankURL), GURL(),
- profile_, PageTransition::START_PAGE,
- false, NULL);
- }
-}
-
///////////////////////////////////////////////////////////////////////////////
// Browser, OnBeforeUnload handling (private):
« no previous file with comments | « chrome/browser/browser.h ('k') | chrome/browser/renderer_host/render_view_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698