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

Unified Diff: chrome/browser/browser_main.cc

Issue 174030: Change default homepage experience. (Closed)
Patch Set: Update so only new users see this Created 11 years, 4 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/browser.cc ('k') | chrome/browser/google_url_tracker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_main.cc
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index 9b71bde82600f63c716c5512b5a3c7a45fc9d0aa..bf9be1b15bf3f2b9352683fcafeb206db6d49f2a 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -633,20 +633,23 @@ int BrowserMain(const MainFunctionParams& parameters) {
// Note that this be done _after_ the PrefService is initialized and all
// preferences are registered, since some of the code that the importer
// touches reads preferences.
- if (is_first_run && !first_run_ui_bypass) {
- if (!OpenFirstRunDialog(profile, homepage_defined, &process_singleton)) {
- // The user cancelled the first run dialog box, we should exit Chrome.
- return ResultCodes::NORMAL_EXIT;
- }
+ if (is_first_run) {
+ if (!first_run_ui_bypass) {
+ if (!OpenFirstRunDialog(profile, homepage_defined, &process_singleton)) {
+ // The user cancelled the first run dialog box, we should exit Chrome.
+ return ResultCodes::NORMAL_EXIT;
+ }
#if defined(OS_POSIX)
- // On Windows, the download is tagged with enable/disable stats so there
- // is no need for this code.
+ // On Windows, the download is tagged with enable/disable stats so there
+ // is no need for this code.
- // If stats reporting was turned on by the first run dialog then toggle
- // the pref.
- if (GoogleUpdateSettings::GetCollectStatsConsent())
- local_state->SetBoolean(prefs::kMetricsReportingEnabled, true);
+ // If stats reporting was turned on by the first run dialog then toggle
+ // the pref.
+ if (GoogleUpdateSettings::GetCollectStatsConsent())
+ local_state->SetBoolean(prefs::kMetricsReportingEnabled, true);
#endif // OS_POSIX
+ }
+ Browser::SetNewHomePagePrefs(user_prefs);
}
// Sets things up so that if we crash from this point on, a dialog will
« no previous file with comments | « chrome/browser/browser.cc ('k') | chrome/browser/google_url_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698