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

Unified Diff: chrome/browser/profiles/profile_manager.cc

Issue 8093016: Show sync promo at startup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 9 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/ui/browser_init.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_manager.cc
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
index 3586a41177351111f92cca0b7de1969584932c70..b3dd87beca8f12a88c7162b5ac32d8b54cc36e4c 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -20,6 +20,7 @@
#include "chrome/browser/sessions/session_service_factory.h"
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/ui/browser_window.h"
+#include "chrome/browser/ui/webui/sync_promo_ui.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_switches.h"
@@ -66,8 +67,14 @@ class NewProfileLauncher : public ProfileManagerObserver {
if (status == STATUS_INITIALIZED) {
DCHECK(profile);
Browser* browser = Browser::Create(profile);
- browser->AddSelectedTabWithURL(GURL(chrome::kChromeUINewTabURL),
- PageTransition::LINK);
+ GURL url;
sky 2011/10/01 20:32:42 This doesn't seem right. Shouldn't we be calling i
sail 2011/10/01 21:37:34 This code is only called if the user adds a new pr
+ if (SyncPromoUI::ShouldShowSyncPromoAtStartup(profile, true)) {
+ SyncPromoUI::DidShowSyncPromoAtStartup(profile);
+ url = GURL(chrome::kChromeUISyncPromoURL);
+ } else {
+ url = GURL(chrome::kChromeUINewTabURL);
+ }
+ browser->AddSelectedTabWithURL(url, PageTransition::LINK);
browser->window()->Show();
}
}
« no previous file with comments | « no previous file | chrome/browser/ui/browser_init.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698