diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-22 20:19:39 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-22 20:19:39 +0000 |
commit | 8763d24b7fa0750beadd93653e7b0848e93e15b7 (patch) | |
tree | 3918ded7000524ba3ea380b61eaac940dc14f0e5 /chrome/browser/browser_main.cc | |
parent | a3b8c2426b032ff72433241bd20d6c5e910fc27e (diff) | |
download | chromium_src-8763d24b7fa0750beadd93653e7b0848e93e15b7.zip chromium_src-8763d24b7fa0750beadd93653e7b0848e93e15b7.tar.gz chromium_src-8763d24b7fa0750beadd93653e7b0848e93e15b7.tar.bz2 |
Refactor the FirstRun code into Windows-specific and portable.
BUG=11971
TEST=fresh install of Chrome should still bring up the first run dialog
Review URL: http://codereview.chromium.org/115689
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16783 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_main.cc')
-rw-r--r-- | chrome/browser/browser_main.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index c50cd6f..cec8e46 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -335,8 +335,8 @@ int BrowserMain(const MainFunctionParams& parameters) { local_state->RegisterStringPref(prefs::kApplicationLocale, L""); local_state->RegisterBooleanPref(prefs::kMetricsReportingEnabled, false); -#if defined(OS_POSIX) - // On POSIX we display the first run dialog as early as possible, so we can +#if defined(OS_MACOSX) + // On Mac OS X we display the first run dialog as early as possible, so we can // get the stats enabled. // TODO: // We check the kNoFirstRun command line switch explicitly here since the @@ -350,8 +350,7 @@ int BrowserMain(const MainFunctionParams& parameters) { Profile* profile = NULL; OpenFirstRunDialog(profile, &process_singleton); } -#endif // OS_POSIX - +#endif // OS_MACOSX // During first run we read the google_update registry key to find what // language the user selected when downloading the installer. This @@ -538,11 +537,11 @@ int BrowserMain(const MainFunctionParams& parameters) { process_singleton.Create(); // TODO: This block of code should probably be used on all platforms! - // On POSIX we need to display this dialog before setting the value of + // On Mac OS X we display this dialog before setting the value of // kMetricsReportingEnabled, so we display this dialog much earlier. // On Windows a download is tagged with stats enabled/disabled so the UI // can be displayed later in the startup process. -#if defined(OS_WIN) +#if !defined(OS_MACOSX) // Show the First Run UI if this is the first time Chrome has been run on // this computer, or we're being compelled to do so by a command line flag. // Note that this be done _after_ the PrefService is initialized and all @@ -551,7 +550,7 @@ int BrowserMain(const MainFunctionParams& parameters) { if (is_first_run && !first_run_ui_bypass) { OpenFirstRunDialog(profile, &process_singleton); } -#endif // OS_WIN +#endif // OS_MACOSX // Sets things up so that if we crash from this point on, a dialog will // popup asking the user to restart chrome. It is done this late to avoid |