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..3707b2dee89de2272f9cf48ef9aef0933e9945df 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) {} |
@@ -890,14 +884,7 @@ void StartupBrowserCreatorImpl::AddStartupURLs( |
std::vector<GURL>::iterator it = |
browser_creator_->first_run_tabs_.begin(); |
while (it != browser_creator_->first_run_tabs_.end()) { |
- // Replace magic names for the actual urls. |
- if (it->host() == "new_tab_page") { |
sky
2014/05/20 17:30:54
Are you sure we aren't actually using these names
cpu_(ooo_6.6-7.5)
2014/05/20 18:35:38
They where at some point at least. They will be in
robertshield
2014/05/20 19:36:26
What Carlos said: these magic values are used by d
|
- startup_urls->push_back(GURL(chrome::kChromeUINewTabURL)); |
- } else if (it->host() == "welcome_page") { |
- startup_urls->push_back(internals::GetWelcomePageURL()); |
- } else { |
- startup_urls->push_back(*it); |
- } |
+ startup_urls->push_back(*it); |
++it; |
} |
browser_creator_->first_run_tabs_.clear(); |
@@ -933,7 +920,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); |