Index: chrome/installer/setup/install_worker.cc |
diff --git a/chrome/installer/setup/install_worker.cc b/chrome/installer/setup/install_worker.cc |
index 43ce81a1676efa5126c00999bd3bd8c73bbfaafc..e322d1e777a87dd87c63a796c103da0c2358a402 100644 |
--- a/chrome/installer/setup/install_worker.cc |
+++ b/chrome/installer/setup/install_worker.cc |
@@ -47,6 +47,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"; |
grt (UTC plus 2)
2012/09/02 14:18:19
please make this an array rather than a pointer.
gab
2012/09/02 16:15:12
Agreed 100%. Done.
|
+ |
+} // namespace |
+ |
namespace installer { |
// Local helper to call AddRegisterComDllWorkItems for all DLLs in a set of |
@@ -908,12 +918,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, |
install_list); |
-#endif |
} |
// Add any remaining work items that involve special settings for |
@@ -1237,6 +1243,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) { |
@@ -1260,9 +1267,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); |
@@ -1274,10 +1283,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 { |