Index: chrome/installer/setup/install_worker.cc |
diff --git a/chrome/installer/setup/install_worker.cc b/chrome/installer/setup/install_worker.cc |
index 07d182b01ee3356ec71c63f5d8c118c744600171..a6b2ef0d2c1f9397bf72b798311aecbc14d853d8 100644 |
--- a/chrome/installer/setup/install_worker.cc |
+++ b/chrome/installer/setup/install_worker.cc |
@@ -50,6 +50,16 @@ |
using base::win::RegKey; |
+namespace { |
+ |
+// The version identifying the work done by setup.exe --configure-user-settings |
+// on user login by way of Active Setup. Increase this value if the work done |
+// in setup_main.cc's handling of kConfigureUserSettings changes and should be |
+// executed again for all users. |
+const wchar_t kActiveSetupVersion[] = L"23,0,0,0"; |
+ |
+} // namespace |
+ |
namespace installer { |
// Local helper to call AddRegisterComDllWorkItems for all DLLs in a set of |
@@ -917,12 +927,8 @@ void AddInstallWorkItems(const InstallationState& original_state, |
AddDelegateExecuteWorkItems(installer_state, src_path, new_version, |
*product, install_list); |
-// TODO(gab): This is only disabled for M22 as the shortcut CL using Active |
-// Setup will not make it in M22. |
-#if 0 |
- AddActiveSetupWorkItems(installer_state, new_version, *product, |
+ AddActiveSetupWorkItems(installer_state, setup_path, new_version, *product, |
install_list); |
-#endif |
} |
// Add any remaining work items that involve special settings for |
@@ -1230,6 +1236,7 @@ void AddDelegateExecuteWorkItems(const InstallerState& installer_state, |
} |
void AddActiveSetupWorkItems(const InstallerState& installer_state, |
+ const FilePath& setup_path, |
const Version& new_version, |
const Product& product, |
WorkItemList* list) { |
@@ -1253,9 +1260,11 @@ void AddActiveSetupWorkItems(const InstallerState& installer_state, |
distribution->GetAppShortCutName(), true); |
CommandLine cmd(installer_state.GetInstallerDirectory(new_version). |
- Append(installer::kSetupExe)); |
+ Append(setup_path.BaseName())); |
cmd.AppendSwitch(installer::switches::kConfigureUserSettings); |
cmd.AppendSwitch(installer::switches::kVerboseLogging); |
+ cmd.AppendSwitch(installer::switches::kSystemLevel); |
+ product.AppendProductFlags(&cmd); |
list->AddSetRegValueWorkItem(root, active_setup_path, L"StubPath", |
cmd.GetCommandLineString(), true); |
@@ -1267,10 +1276,8 @@ void AddActiveSetupWorkItems(const InstallerState& installer_state, |
list->AddSetRegValueWorkItem(root, active_setup_path, L"IsInstalled", |
static_cast<DWORD>(1U), true); |
- string16 comma_separated_version(ASCIIToUTF16(new_version.GetString())); |
- ReplaceChars(comma_separated_version, L".", L",", &comma_separated_version); |
list->AddSetRegValueWorkItem(root, active_setup_path, L"Version", |
- comma_separated_version, true); |
+ kActiveSetupVersion, true); |
} |
namespace { |