| Index: chrome/browser/ui/browser_init.cc
|
| diff --git a/chrome/browser/ui/browser_init.cc b/chrome/browser/ui/browser_init.cc
|
| index 237de737150747e80c53f4be9d10b8908af6fd50..cf29f554eed5043f98cbc4e760cbed36fb0ec360 100644
|
| --- a/chrome/browser/ui/browser_init.cc
|
| +++ b/chrome/browser/ui/browser_init.cc
|
| @@ -58,6 +58,7 @@
|
| #include "chrome/browser/ui/browser_navigator.h"
|
| #include "chrome/browser/ui/browser_window.h"
|
| #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
|
| +#include "chrome/browser/ui/webui/sync_promo_ui.h"
|
| #include "chrome/common/chrome_constants.h"
|
| #include "chrome/common/chrome_paths.h"
|
| #include "chrome/common/chrome_result_codes.h"
|
| @@ -1249,7 +1250,13 @@ void BrowserInit::LaunchWithProfile::AddStartupURLs(
|
| while (it != browser_init_->first_run_tabs_.end()) {
|
| // Replace magic names for the actual urls.
|
| if (it->host() == "new_tab_page") {
|
| - startup_urls->push_back(GURL(chrome::kChromeUINewTabURL));
|
| + if (SyncPromoUI::ShouldShowSyncPromoAtStartup(profile_,
|
| + FirstRun::IsChromeFirstRun())) {
|
| + SyncPromoUI::DidShowSyncPromoAtStartup(profile_);
|
| + startup_urls->push_back(GURL(chrome::kChromeUISyncPromoURL));
|
| + } else {
|
| + startup_urls->push_back(GURL(chrome::kChromeUINewTabURL));
|
| + }
|
| } else if (it->host() == "welcome_page") {
|
| startup_urls->push_back(GetWelcomePageURL());
|
| } else {
|
| @@ -1265,7 +1272,13 @@ void BrowserInit::LaunchWithProfile::AddStartupURLs(
|
| // Otherwise open at least the new tab page (and the welcome page, if this
|
| // is the first time the browser is being started), or the set of URLs
|
| // specified on the command line.
|
| - startup_urls->push_back(GURL()); // New tab page.
|
| + if (SyncPromoUI::ShouldShowSyncPromoAtStartup(profile_,
|
| + FirstRun::IsChromeFirstRun())) {
|
| + SyncPromoUI::DidShowSyncPromoAtStartup(profile_);
|
| + startup_urls->push_back(GURL(chrome::kChromeUISyncPromoURL));
|
| + } else {
|
| + startup_urls->push_back(GURL()); // New tab page.
|
| + }
|
| PrefService* prefs = g_browser_process->local_state();
|
| if (prefs->FindPreference(prefs::kShouldShowWelcomePage) &&
|
| prefs->GetBoolean(prefs::kShouldShowWelcomePage)) {
|
|
|