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

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: fix build error Created 9 years, 2 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 | « chrome/browser/chromeos/login/login_utils.cc ('k') | chrome/browser/ui/browser_browsertest.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..083c014997bab765a2ef07f70253aeced4a7915e 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -19,7 +19,9 @@
#include "chrome/browser/profiles/profile_info_cache.h"
#include "chrome/browser/sessions/session_service_factory.h"
#include "chrome/browser/sync/profile_sync_service.h"
+#include "chrome/browser/ui/browser_init.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"
@@ -65,10 +67,12 @@ class NewProfileLauncher : public ProfileManagerObserver {
virtual void OnProfileCreated(Profile* profile, Status status) {
if (status == STATUS_INITIALIZED) {
DCHECK(profile);
- Browser* browser = Browser::Create(profile);
- browser->AddSelectedTabWithURL(GURL(chrome::kChromeUINewTabURL),
- PageTransition::LINK);
- browser->window()->Show();
+ CommandLine command_line(CommandLine::NO_PROGRAM);
+ int return_code;
+ BrowserInit browser_init;
+ browser_init.LaunchBrowser(
+ command_line, profile, FilePath(), BrowserInit::IS_PROCESS_STARTUP,
+ BrowserInit::IS_FIRST_RUN, &return_code);
}
}
« no previous file with comments | « chrome/browser/chromeos/login/login_utils.cc ('k') | chrome/browser/ui/browser_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698