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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 386 } | 386 } |
| 387 if (p.is_chrome()) { | 387 if (p.is_chrome()) { |
| 388 AddOsUpgradeWorkItems(installer_state, setup_path, new_version, p, | 388 AddOsUpgradeWorkItems(installer_state, setup_path, new_version, p, |
| 389 list); | 389 list); |
| 390 AddInstallExtensionCommandWorkItem(installer_state, original_state, | 390 AddInstallExtensionCommandWorkItem(installer_state, original_state, |
| 391 setup_path, new_version, p, list); | 391 setup_path, new_version, p, list); |
| 392 } | 392 } |
| 393 if (p.is_chrome_binaries()) { | 393 if (p.is_chrome_binaries()) { |
| 394 AddQueryEULAAcceptanceWorkItems( | 394 AddQueryEULAAcceptanceWorkItems( |
| 395 installer_state, setup_path, new_version, p, list); | 395 installer_state, setup_path, new_version, p, list); |
| 396 AddQuickEnableChromeFrameWorkItems( | 396 AddQuickEnableChromeFrameWorkItems(installer_state, list); |
| 397 installer_state, original_state, setup_path, new_version, list); | |
| 398 AddQuickEnableApplicationLauncherWorkItems( | 397 AddQuickEnableApplicationLauncherWorkItems( |
| 399 installer_state, original_state, setup_path, new_version, list); | 398 installer_state, original_state, setup_path, new_version, list); |
| 400 } | 399 } |
| 401 } | 400 } |
| 402 } | 401 } |
| 403 | 402 |
| 404 // This is called when an MSI installation is run. It may be that a user is | 403 // This is called when an MSI installation is run. It may be that a user is |
| 405 // attempting to install the MSI on top of a non-MSI managed installation. | 404 // attempting to install the MSI on top of a non-MSI managed installation. |
| 406 // If so, try and remove any existing uninstallation shortcuts, as we want the | 405 // If so, try and remove any existing uninstallation shortcuts, as we want the |
| 407 // uninstall to be managed entirely by the MSI machinery (accessible via the | 406 // uninstall to be managed entirely by the MSI machinery (accessible via the |
| (...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1505 if (installer_state.verbose_logging()) | 1504 if (installer_state.verbose_logging()) |
| 1506 cmd_line.AppendSwitch(installer::switches::kVerboseLogging); | 1505 cmd_line.AppendSwitch(installer::switches::kVerboseLogging); |
| 1507 AppCommand cmd(cmd_line.GetCommandLineString()); | 1506 AppCommand cmd(cmd_line.GetCommandLineString()); |
| 1508 cmd.set_is_web_accessible(true); | 1507 cmd.set_is_web_accessible(true); |
| 1509 cmd.set_is_run_as_user(true); | 1508 cmd.set_is_run_as_user(true); |
| 1510 cmd.AddWorkItems(installer_state.root_key(), cmd_key, work_item_list); | 1509 cmd.AddWorkItems(installer_state.root_key(), cmd_key, work_item_list); |
| 1511 } | 1510 } |
| 1512 } | 1511 } |
| 1513 | 1512 |
| 1514 void AddQuickEnableChromeFrameWorkItems(const InstallerState& installer_state, | 1513 void AddQuickEnableChromeFrameWorkItems(const InstallerState& installer_state, |
| 1515 const InstallationState& machine_state, | |
| 1516 const base::FilePath& setup_path, | |
| 1517 const Version& new_version, | |
| 1518 WorkItemList* work_item_list) { | 1514 WorkItemList* work_item_list) { |
| 1519 DCHECK(work_item_list); | 1515 DCHECK(work_item_list); |
| 1520 | 1516 |
| 1521 const bool system_install = installer_state.system_install(); | |
| 1522 bool will_have_chrome_frame = | |
| 1523 WillProductBePresentAfterSetup(installer_state, machine_state, | |
| 1524 BrowserDistribution::CHROME_FRAME); | |
| 1525 bool will_have_chrome_binaries = | |
| 1526 WillProductBePresentAfterSetup(installer_state, machine_state, | |
| 1527 BrowserDistribution::CHROME_BINARIES); | |
| 1528 | |
| 1529 string16 cmd_key(GetRegCommandKey( | 1517 string16 cmd_key(GetRegCommandKey( |
| 1530 BrowserDistribution::GetSpecificDistribution( | 1518 BrowserDistribution::GetSpecificDistribution( |
| 1531 BrowserDistribution::CHROME_BINARIES), | 1519 BrowserDistribution::CHROME_BINARIES), |
| 1532 kCmdQuickEnableCf)); | 1520 kCmdQuickEnableCf)); |
| 1533 | 1521 |
| 1534 if (will_have_chrome_frame) { | 1522 // Unconditionally remove the legacy Quick Enable command from the binaries. |
| 1535 // Chrome Frame is (to be) installed. Unconditionally remove the Quick | 1523 // Do this even if multi-install Chrome isn't installed to ensure that they |
|
robertshield
2013/12/16 16:50:12
s/they are/it is/
grt (UTC plus 2)
2013/12/16 17:53:16
Done.
| |
| 1536 // Enable command from the binaries. We do this even if multi-install Chrome | 1524 // are not left behind in any case. |
| 1537 // isn't installed since we don't want them left behind in any case. | 1525 work_item_list->AddDeleteRegKeyWorkItem( |
| 1538 work_item_list->AddDeleteRegKeyWorkItem( | 1526 installer_state.root_key(), cmd_key)->set_log_message( |
| 1539 installer_state.root_key(), cmd_key)->set_log_message( | 1527 "removing " + WideToASCII(kCmdQuickEnableCf) + " command"); |
| 1540 "removing " + WideToASCII(kCmdQuickEnableCf) + " command"); | |
| 1541 | 1528 |
| 1542 } else if (will_have_chrome_binaries) { | |
| 1543 // Chrome Frame isn't (to be) installed while some other multi-install | |
| 1544 // product is (to be) installed. Add the Quick Enable command to | |
| 1545 // the binaries. | |
| 1546 CommandLine cmd_line(GetGenericQuickEnableCommand(installer_state, | |
| 1547 machine_state, | |
| 1548 setup_path, | |
| 1549 new_version)); | |
| 1550 // kMultiInstall and kVerboseLogging were processed above. | |
| 1551 cmd_line.AppendSwitch(switches::kChromeFrameQuickEnable); | |
| 1552 if (installer_state.system_install()) | |
| 1553 cmd_line.AppendSwitch(switches::kSystemLevel); | |
| 1554 AppCommand cmd(cmd_line.GetCommandLineString()); | |
| 1555 cmd.set_sends_pings(true); | |
| 1556 cmd.set_is_web_accessible(true); | |
| 1557 cmd.AddWorkItems(installer_state.root_key(), cmd_key, work_item_list); | |
| 1558 } | |
| 1559 } | 1529 } |
| 1560 | 1530 |
| 1561 } // namespace installer | 1531 } // namespace installer |
| OLD | NEW |