diff options
author | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-02 14:11:48 +0000 |
---|---|---|
committer | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-02 14:11:48 +0000 |
commit | 6dca1656de4e892de2ba93935fb9b487885e6f47 (patch) | |
tree | bdeb57453790bfde8cdfb497e9b9272d5d7f3671 /chrome/installer | |
parent | 0c3b370a6b856ccc836d86ef062551076f31870c (diff) | |
download | chromium_src-6dca1656de4e892de2ba93935fb9b487885e6f47.zip chromium_src-6dca1656de4e892de2ba93935fb9b487885e6f47.tar.gz chromium_src-6dca1656de4e892de2ba93935fb9b487885e6f47.tar.bz2 |
Add additional granularity to the installer stage strings that get written to the "ap" value during the end stage of the installer (where we seem to encounter most of our crashes / timeouts).
Note that this CL alters the length of the InstallerStage enum (and modifies the guarding COMPILE_ASSERT). This is safe right now because we don't report the numeric values directly.
BUG=NONE
TEST=We start getting more useful data about the point at which the installer crashes / times out.
Review URL: http://codereview.chromium.org/7080058
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87605 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer')
-rw-r--r-- | chrome/installer/setup/install.cc | 12 | ||||
-rw-r--r-- | chrome/installer/setup/setup_main.cc | 2 | ||||
-rw-r--r-- | chrome/installer/util/install_util.cc | 12 | ||||
-rw-r--r-- | chrome/installer/util/util_constants.h | 16 |
4 files changed, 37 insertions, 5 deletions
diff --git a/chrome/installer/setup/install.cc b/chrome/installer/setup/install.cc index bd90089..720e346 100644 --- a/chrome/installer/setup/install.cc +++ b/chrome/installer/setup/install.cc @@ -298,7 +298,7 @@ installer::InstallStatus InstallNewVersion( return result; } - installer_state.UpdateStage(installer::FINISHING); + installer_state.UpdateStage(installer::REFRESHING_POLICY); installer::RefreshElevationPolicy(); @@ -365,10 +365,14 @@ InstallStatus InstallOrUpdateProduct( // TODO(robertshield): Everything below this line should instead be captured // by WorkItems. if (!InstallUtil::GetInstallReturnCode(result)) { + installer_state.UpdateStage(installer::UPDATING_CHANNELS); + // Update the modifiers on the channel values for the product(s) being // installed and for the binaries in case of multi-install. installer_state.UpdateChannels(); + installer_state.UpdateStage(installer::COPYING_PREFERENCES_FILE); + if (result == FIRST_INSTALL_SUCCESS && !prefs_path.empty()) CopyPreferenceFileForFirstRun(installer_state, prefs_path); @@ -381,6 +385,8 @@ InstallStatus InstallOrUpdateProduct( const Product* chrome_install = installer_state.FindProduct(BrowserDistribution::CHROME_BROWSER); if (chrome_install && !do_not_create_shortcuts) { + installer_state.UpdateStage(installer::CREATING_SHORTCUTS); + bool create_all_shortcut = false; prefs.GetBool(master_preferences::kCreateAllShortcuts, &create_all_shortcut); @@ -407,10 +413,14 @@ InstallStatus InstallOrUpdateProduct( &force_chrome_default_for_user); } + installer_state.UpdateStage(installer::REGISTERING_CHROME); + RegisterChromeOnMachine(installer_state, *chrome_install, make_chrome_default || force_chrome_default_for_user); } + installer_state.UpdateStage(installer::REMOVING_OLD_VERSIONS); + installer_state.RemoveOldVersionDirectories( new_version, existing_version.get(), diff --git a/chrome/installer/setup/setup_main.cc b/chrome/installer/setup/setup_main.cc index a103333..7e4c4ad 100644 --- a/chrome/installer/setup/setup_main.cc +++ b/chrome/installer/setup/setup_main.cc @@ -583,6 +583,8 @@ installer::InstallStatus InstallProductsHelper( } } + installer_state.UpdateStage(installer::FINISHING); + // Only do Chrome-specific stuff (like launching the browser) if // Chrome was specifically requested (rather than being upgraded as // part of a multi-install). diff --git a/chrome/installer/util/install_util.cc b/chrome/installer/util/install_util.cc index 1f5e000..e36fa43 100644 --- a/chrome/installer/util/install_util.cc +++ b/chrome/installer/util/install_util.cc @@ -39,13 +39,19 @@ namespace { const wchar_t kStageBinaryPatching[] = L"binary_patching"; const wchar_t kStageBuilding[] = L"building"; +const wchar_t kStageCopyingPreferencesFile[] = L"copying_prefs"; +const wchar_t kStageCreatingShortcuts[] = L"creating_shortcuts"; const wchar_t kStageEnsemblePatching[] = L"ensemble_patching"; const wchar_t kStageExecuting[] = L"executing"; const wchar_t kStageFinishing[] = L"finishing"; const wchar_t kStagePreconditions[] = L"preconditions"; +const wchar_t kStageRefreshingPolicy[] = L"refreshing_policy"; +const wchar_t kStageRegisteringChrome[] = L"registering_chrome"; +const wchar_t kStageRemovingOldVersions[] = L"removing_old_ver"; const wchar_t kStageRollingback[] = L"rollingback"; const wchar_t kStageUncompressing[] = L"uncompressing"; const wchar_t kStageUnpacking[] = L"unpacking"; +const wchar_t kStageUpdatingChannels[] = L"updating_channels"; const wchar_t* const kStages[] = { NULL, @@ -57,6 +63,12 @@ const wchar_t* const kStages[] = { kStageBuilding, kStageExecuting, kStageRollingback, + kStageRefreshingPolicy, + kStageUpdatingChannels, + kStageCopyingPreferencesFile, + kStageCreatingShortcuts, + kStageRegisteringChrome, + kStageRemovingOldVersions, kStageFinishing }; diff --git a/chrome/installer/util/util_constants.h b/chrome/installer/util/util_constants.h index 868c4ee..cb183f0 100644 --- a/chrome/installer/util/util_constants.h +++ b/chrome/installer/util/util_constants.h @@ -35,7 +35,7 @@ enum InstallStatus { CHROME_RUNNING, // 16. Chrome currently running (when trying to // uninstall) UNINSTALL_CONFIRMED, // 17. User has confirmed Chrome uninstall - UNINSTALL_DELETE_PROFILE, // 18. User confirmed uninstall and profile deletion + UNINSTALL_DELETE_PROFILE, // 18. User okayed uninstall and profile deletion. UNINSTALL_SUCCESSFUL, // 19. Chrome successfully uninstalled UNINSTALL_FAILED, // 20. Chrome uninstallation failed UNINSTALL_CANCELLED, // 21. User cancelled Chrome uninstallation @@ -101,11 +101,19 @@ enum InstallerStage { BUILDING, // 6: Building the install work item list. EXECUTING, // 7: Executing the install work item list. ROLLINGBACK, // 8: Rolling-back the install work item list. - FINISHING, // 9: Finishing after the install work item list. - NUM_STAGES // 10: The number of stages. + REFRESHING_POLICY, // 9: Refreshing the elevation policy. + UPDATING_CHANNELS, // 10: Updating channel information. + COPYING_PREFERENCES_FILE, // 11: Copying preferences file. + CREATING_SHORTCUTS, // 12: Creating shortcuts. + REGISTERING_CHROME, // 13: Performing Chrome registration. + REMOVING_OLD_VERSIONS, // 14: Deleting old version directories. + FINISHING, // 15: Finishing the install. + NUM_STAGES // 16: The number of stages. }; -COMPILE_ASSERT(FINISHING == 9, +// When we start reporting the numerical values from the enum, the order +// above MUST be preserved. +COMPILE_ASSERT(FINISHING == 15, never_ever_ever_change_InstallerStage_values_bang); namespace switches { |