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

Unified Diff: chrome/browser/first_run/first_run.cc

Issue 11636031: [Fixit Dec-2012] Refactor first_run, very few things should depend on whether the First Run senti... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge up to r174446 Created 8 years 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
Index: chrome/browser/first_run/first_run.cc
diff --git a/chrome/browser/first_run/first_run.cc b/chrome/browser/first_run/first_run.cc
index 15ca817ac677f12c391ab2adacbc35f077924299..5c028cfe7b422e3041284770e7131569b9a90483 100644
--- a/chrome/browser/first_run/first_run.cc
+++ b/chrome/browser/first_run/first_run.cc
@@ -554,14 +554,14 @@ ProcessMasterPreferencesResult ProcessMasterPreferences(
// Chrome OS has its own out-of-box-experience code. Create the sentinel to
// mark the fact that we've run once but skip the full first-run flow.
CreateSentinel();
- return SKIP_FIRST_RUN;
+ return SKIP_FIRST_RUN_TASKS;
#endif
FilePath master_prefs_path;
scoped_ptr<installer::MasterPreferences>
install_prefs(internal::LoadMasterPrefs(&master_prefs_path));
if (!install_prefs.get())
- return SHOW_FIRST_RUN;
+ return DO_FIRST_RUN_TASKS;
out_prefs->new_tabs = install_prefs->GetFirstRunTabs();
@@ -571,7 +571,7 @@ ProcessMasterPreferencesResult ProcessMasterPreferences(
return EULA_EXIT_NOW;
if (!internal::CopyPrefFile(user_data_dir, master_prefs_path))
- return SHOW_FIRST_RUN;
+ return DO_FIRST_RUN_TASKS;
DoDelayedInstallExtensionsIfNeeded(install_prefs.get());
@@ -581,7 +581,7 @@ ProcessMasterPreferencesResult ProcessMasterPreferences(
internal::SetImportPreferencesAndLaunchImport(out_prefs, install_prefs.get());
internal::SetDefaultBrowser(install_prefs.get());
- return SHOW_FIRST_RUN;
+ return DO_FIRST_RUN_TASKS;
}
void AutoImport(
@@ -676,7 +676,7 @@ void AutoImport(
#endif // !defined(USE_AURA)
}
-void DoFirstRunTasks(Profile* profile, bool make_chrome_default) {
+void DoPostImportTasks(Profile* profile, bool make_chrome_default) {
if (make_chrome_default &&
ShellIntegration::CanSetAsDefaultBrowser() ==
ShellIntegration::SET_DEFAULT_UNATTENDED) {
@@ -702,6 +702,8 @@ void DoFirstRunTasks(Profile* profile, bool make_chrome_default) {
SetShowWelcomePagePref();
SetPersonalDataManagerFirstRunPref();
#endif // !defined(USE_AURA)
+
+ internal::DoPostImportPlatformSpecificTasks();
}
} // namespace first_run

Powered by Google App Engine
This is Rietveld 408576698