Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3513)

Unified Diff: chrome/installer/setup/install_worker.cc

Issue 10889028: Install a user-level Start Menu shortcut for every user on system-installs through Active Setup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove TODO for Notify Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 {

Powered by Google App Engine
This is Rietveld 408576698