Index: chrome/installer/setup/install.cc |
diff --git a/chrome/installer/setup/install.cc b/chrome/installer/setup/install.cc |
index 2bb42f1eec62517c9f5552028d0e9ae291d37645..2bb52f996566dc1267c955196bc8321325fd33d4 100644 |
--- a/chrome/installer/setup/install.cc |
+++ b/chrome/installer/setup/install.cc |
@@ -29,6 +29,7 @@ |
#include "chrome/installer/setup/setup_constants.h" |
#include "chrome/installer/setup/setup_util.h" |
#include "chrome/installer/setup/update_active_setup_version_work_item.h" |
+#include "chrome/installer/setup/user_experiment.h" |
#include "chrome/installer/util/beacons.h" |
#include "chrome/installer/util/browser_distribution.h" |
#include "chrome/installer/util/create_reg_key_work_item.h" |
@@ -664,14 +665,17 @@ void HandleOsUpgradeForBrowser(const installer::InstallerState& installer_state, |
// be increased for Active Setup to invoke this again for all users of this |
// install. It may also be invoked again when a system-level chrome install goes |
// through an OS upgrade. |
-void HandleActiveSetupForBrowser(const base::FilePath& installation_root, |
- const installer::Product& chrome, |
- bool force) { |
+void HandleActiveSetupForBrowser(bool force, |
+ const base::CommandLine& command_line, |
+ const MasterPreferences& master_preferences, |
+ InstallationState* original_state, |
+ InstallerState* installer_state) { |
std::unique_ptr<WorkItemList> cleanup_list(WorkItem::CreateWorkItemList()); |
cleanup_list->set_log_message("Cleanup deprecated per-user registrations"); |
cleanup_list->set_rollback_enabled(false); |
cleanup_list->set_best_effort(true); |
- AddCleanupDeprecatedPerUserRegistrationsWorkItems(chrome, cleanup_list.get()); |
+ AddCleanupDeprecatedPerUserRegistrationsWorkItems(installer_state->product(), |
+ cleanup_list.get()); |
cleanup_list->Do(); |
// Only create shortcuts on Active Setup if the first run sentinel is not |
@@ -686,13 +690,20 @@ void HandleActiveSetupForBrowser(const base::FilePath& installation_root, |
? INSTALL_SHORTCUT_REPLACE_EXISTING |
: INSTALL_SHORTCUT_CREATE_EACH_IF_NO_SYSTEM_LEVEL; |
- // Read master_preferences copied beside chrome.exe at install. |
+ // Read master_preferences copied beside chrome.exe at install for the sake of |
+ // creating/updating shortcuts. |
+ const base::FilePath installation_root = installer_state->target_path(); |
MasterPreferences prefs(installation_root.AppendASCII(kDefaultMasterPrefs)); |
base::FilePath chrome_exe(installation_root.Append(kChromeExe)); |
- CreateOrUpdateShortcuts( |
- chrome_exe, chrome, prefs, CURRENT_USER, install_operation); |
+ CreateOrUpdateShortcuts(chrome_exe, installer_state->product(), prefs, |
+ CURRENT_USER, install_operation); |
UpdateDefaultBrowserBeaconForPath(chrome_exe); |
+ |
+ if (ShouldRunUserExperiment()) { |
+ RunUserExperiment(command_line, master_preferences, original_state, |
+ installer_state); |
+ } |
} |
} // namespace installer |