Index: chrome/browser/ui/browser_init.cc |
diff --git a/chrome/browser/ui/browser_init.cc b/chrome/browser/ui/browser_init.cc |
index 640bbe7c1e47ece28285d8730db758a7ecc81fad..b5915845aae64ce366495f2b275234bccf190753 100644 |
--- a/chrome/browser/ui/browser_init.cc |
+++ b/chrome/browser/ui/browser_init.cc |
@@ -744,7 +744,7 @@ SessionStartupPref BrowserInit::GetSessionStartupPref( |
// We don't store session information when incognito. If the user has |
// chosen to restore last session and launched incognito, fallback to |
// default launch behavior. |
- pref.type = SessionStartupPref::DEFAULT; |
+ pref.type = SessionStartupPref::NEWTAB; |
} |
return pref; |
} |
@@ -1037,7 +1037,7 @@ bool BrowserInit::LaunchWithProfile::ProcessStartupURLs( |
if (command_line_.HasSwitch(switches::kTestingChannelID) && |
!command_line_.HasSwitch(switches::kRestoreLastSession) && |
browser_defaults::kDefaultSessionStartupType != |
- SessionStartupPref::DEFAULT) { |
+ SessionStartupPref::NEWTAB) { |
// When we have non DEFAULT session start type, then we won't open up a |
// fresh session. But none of the tests are written with this in mind, so |
// we explicitly ignore it during testing. |
@@ -1103,11 +1103,16 @@ Browser* BrowserInit::LaunchWithProfile::ProcessSpecifiedURLs( |
// specified on the command line. Filter out any urls that are to be |
// restored by virtue of having been previously pinned. |
AddUniqueURLs(pref.urls, &tabs); |
- } else if (pref.type == SessionStartupPref::DEFAULT && !tabs.empty()) { |
- // Make sure the home page is opened even if there are pinned tabs. |
- std::vector<GURL> urls; |
- AddStartupURLs(&urls); |
- UrlsToTabs(urls, &tabs); |
+ } else if (pref.type == SessionStartupPref::NEWTAB) { |
+ BrowserInit::LaunchWithProfile::Tab tab; |
+ tab.is_pinned = false; |
+ tab.url = GURL(chrome::kChromeUINewTabURL); |
+ tabs.push_back(tab); |
+ } else if (pref.type == SessionStartupPref::HOMEPAGE) { |
+ // If the user had 'homepage' selected, we should have migrated |
+ // them to 'URLS' instead. |
+ DLOG(ERROR) << "pref.type == HOMEPAGE"; |
+ NOTREACHED(); |
} |
if (tabs.empty()) |