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

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

Issue 292713003: Session restore shouldn't care about profile home pages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: disable 2 tests on mac (they fail after "fixed") Created 6 years, 7 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
Index: chrome/browser/ui/startup/startup_browser_creator_impl.cc
diff --git a/chrome/browser/ui/startup/startup_browser_creator_impl.cc b/chrome/browser/ui/startup/startup_browser_creator_impl.cc
index 9ea079f53d99aac2954565d3968c24ca1fd45c72..ae3efaef48e674fbd2566534bdd9c6a20595286b 100644
--- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc
+++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc
@@ -248,12 +248,6 @@ void RecordAppLaunches(Profile* profile,
}
}
-bool IsNewTabURL(Profile* profile, const GURL& url) {
- GURL ntp_url(chrome::kChromeUINewTabURL);
- return url == ntp_url ||
- (url.is_empty() && profile->GetHomePage() == ntp_url);
-}
-
class WebContentsCloseObserver : public content::NotificationObserver {
public:
WebContentsCloseObserver() : contents_(NULL) {}
@@ -933,7 +927,8 @@ void StartupBrowserCreatorImpl::AddStartupURLs(
// If the first URL is the NTP, replace it with the sync promo. This
// behavior is desired because completing or skipping the sync promo
// causes a redirect to the NTP.
- if (!startup_urls->empty() && IsNewTabURL(profile_, startup_urls->at(0)))
+ if (!startup_urls->empty() &&
+ startup_urls->at(0) == GURL(chrome::kChromeUINewTabURL))
startup_urls->at(0) = sync_promo_url;
else
startup_urls->insert(startup_urls->begin(), sync_promo_url);

Powered by Google App Engine
This is Rietveld 408576698