Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 // | 4 // |
| 5 // This file contains the definitions of the installer functions that build | 5 // This file contains the definitions of the installer functions that build |
| 6 // the WorkItemList used to install the application. | 6 // the WorkItemList used to install the application. |
| 7 | 7 |
| 8 #include "chrome/installer/setup/install_worker.h" | 8 #include "chrome/installer/setup/install_worker.h" |
| 9 | 9 |
| 10 #include <oaidl.h> | 10 #include <oaidl.h> |
| (...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 901 | 901 |
| 902 AddUninstallShortcutWorkItems(installer_state, setup_path, new_version, | 902 AddUninstallShortcutWorkItems(installer_state, setup_path, new_version, |
| 903 install_list, *product); | 903 install_list, *product); |
| 904 | 904 |
| 905 AddVersionKeyWorkItems(root, product->distribution(), new_version, | 905 AddVersionKeyWorkItems(root, product->distribution(), new_version, |
| 906 add_language_identifier, install_list); | 906 add_language_identifier, install_list); |
| 907 | 907 |
| 908 AddDelegateExecuteWorkItems(installer_state, src_path, new_version, | 908 AddDelegateExecuteWorkItems(installer_state, src_path, new_version, |
| 909 *product, install_list); | 909 *product, install_list); |
| 910 | 910 |
| 911 // TODO(gab): This is only disabled for M22 as the shortcut CL using Active | |
| 912 // Setup will not make it in M22. | |
| 913 #if 0 | |
| 914 AddActiveSetupWorkItems(installer_state, new_version, *product, | 911 AddActiveSetupWorkItems(installer_state, new_version, *product, |
| 915 install_list); | 912 install_list); |
| 916 #endif | |
| 917 } | 913 } |
| 918 | 914 |
| 919 // Add any remaining work items that involve special settings for | 915 // Add any remaining work items that involve special settings for |
| 920 // each product. | 916 // each product. |
| 921 AddProductSpecificWorkItems(original_state, installer_state, setup_path, | 917 AddProductSpecificWorkItems(original_state, installer_state, setup_path, |
| 922 new_version, install_list); | 918 new_version, install_list); |
| 923 | 919 |
| 924 // Copy over brand, usagestats, and other values. | 920 // Copy over brand, usagestats, and other values. |
| 925 AddGoogleUpdateWorkItems(original_state, installer_state, install_list); | 921 AddGoogleUpdateWorkItems(original_state, installer_state, install_list); |
| 926 | 922 |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1252 } | 1248 } |
| 1253 | 1249 |
| 1254 const HKEY root = HKEY_LOCAL_MACHINE; | 1250 const HKEY root = HKEY_LOCAL_MACHINE; |
| 1255 const string16 active_setup_path(GetActiveSetupPath(distribution)); | 1251 const string16 active_setup_path(GetActiveSetupPath(distribution)); |
| 1256 | 1252 |
| 1257 VLOG(1) << "Adding registration items for Active Setup."; | 1253 VLOG(1) << "Adding registration items for Active Setup."; |
| 1258 list->AddCreateRegKeyWorkItem(root, active_setup_path); | 1254 list->AddCreateRegKeyWorkItem(root, active_setup_path); |
| 1259 list->AddSetRegValueWorkItem(root, active_setup_path, L"", | 1255 list->AddSetRegValueWorkItem(root, active_setup_path, L"", |
| 1260 distribution->GetAppShortCutName(), true); | 1256 distribution->GetAppShortCutName(), true); |
| 1261 | 1257 |
| 1262 CommandLine cmd(installer_state.GetInstallerDirectory(new_version). | 1258 CommandLine cmd(installer_state.GetInstallerDirectory(new_version). |
|
grt (UTC plus 2)
2012/08/29 17:07:06
i think you should add --system-level to the comma
gab
2012/08/29 21:53:00
Done already :).
| |
| 1263 Append(installer::kSetupExe)); | 1259 Append(installer::kSetupExe)); |
| 1264 cmd.AppendSwitch(installer::switches::kConfigureUserSettings); | 1260 cmd.AppendSwitch(installer::switches::kConfigureUserSettings); |
| 1265 cmd.AppendSwitch(installer::switches::kVerboseLogging); | 1261 cmd.AppendSwitch(installer::switches::kVerboseLogging); |
| 1266 list->AddSetRegValueWorkItem(root, active_setup_path, L"StubPath", | 1262 list->AddSetRegValueWorkItem(root, active_setup_path, L"StubPath", |
| 1267 cmd.GetCommandLineString(), true); | 1263 cmd.GetCommandLineString(), true); |
| 1268 | 1264 |
| 1269 // TODO(grt): http://crbug.com/75152 Write a reference to a localized | 1265 // TODO(grt): http://crbug.com/75152 Write a reference to a localized |
| 1270 // resource. | 1266 // resource. |
| 1271 list->AddSetRegValueWorkItem(root, active_setup_path, L"Localized Name", | 1267 list->AddSetRegValueWorkItem(root, active_setup_path, L"Localized Name", |
| 1272 distribution->GetAppShortCutName(), true); | 1268 distribution->GetAppShortCutName(), true); |
| 1273 | 1269 |
| 1274 list->AddSetRegValueWorkItem(root, active_setup_path, L"IsInstalled", | 1270 list->AddSetRegValueWorkItem(root, active_setup_path, L"IsInstalled", |
| 1275 static_cast<DWORD>(1U), true); | 1271 static_cast<DWORD>(1U), true); |
| 1276 | 1272 |
| 1277 string16 comma_separated_version(ASCIIToUTF16(new_version.GetString())); | 1273 // This is not the Chrome version. To have Active Setup run again for users |
| 1278 ReplaceChars(comma_separated_version, L".", L",", &comma_separated_version); | 1274 // that have already ran it, simply increase this number. |
|
grt (UTC plus 2)
2012/08/29 17:07:06
ran -> run
gab
2012/08/29 21:53:00
Done.
| |
| 1275 // Start at 23,0,0,0 because this was set to Chrome's version for a short | |
| 1276 // period on dev-channel of Chrome 22. | |
| 1277 static const wchar_t* kActiveSetupVersion = L"23,0,0,0"; | |
|
robertshield
2012/08/29 16:59:30
Please move this to the top of the file, also expl
gab
2012/08/29 21:53:00
Done.
| |
| 1279 list->AddSetRegValueWorkItem(root, active_setup_path, L"Version", | 1278 list->AddSetRegValueWorkItem(root, active_setup_path, L"Version", |
| 1280 comma_separated_version, true); | 1279 string16(kActiveSetupVersion), true); |
| 1281 } | 1280 } |
| 1282 | 1281 |
| 1283 namespace { | 1282 namespace { |
| 1284 | 1283 |
| 1285 enum ElevationPolicyId { | 1284 enum ElevationPolicyId { |
| 1286 CURRENT_ELEVATION_POLICY, | 1285 CURRENT_ELEVATION_POLICY, |
| 1287 OLD_ELEVATION_POLICY, | 1286 OLD_ELEVATION_POLICY, |
| 1288 }; | 1287 }; |
| 1289 | 1288 |
| 1290 // Although the UUID of the ChromeFrame class is used for the "current" value, | 1289 // Although the UUID of the ChromeFrame class is used for the "current" value, |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1587 machine_state, | 1586 machine_state, |
| 1588 setup_path, | 1587 setup_path, |
| 1589 new_version, | 1588 new_version, |
| 1590 work_item_list, | 1589 work_item_list, |
| 1591 false, // have_child_product | 1590 false, // have_child_product |
| 1592 cmd_line, | 1591 cmd_line, |
| 1593 kCmdQuickEnableApplicationHost); | 1592 kCmdQuickEnableApplicationHost); |
| 1594 } | 1593 } |
| 1595 | 1594 |
| 1596 } // namespace installer | 1595 } // namespace installer |
| OLD | NEW |