| 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 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 614 browser_dist->GetAppShortCutName(), true); | 614 browser_dist->GetAppShortCutName(), true); |
| 615 install_list->AddSetRegValueWorkItem(reg_root, | 615 install_list->AddSetRegValueWorkItem(reg_root, |
| 616 uninstall_reg, installer::kUninstallStringField, | 616 uninstall_reg, installer::kUninstallStringField, |
| 617 quoted_uninstall_cmd.GetCommandLineString(), true); | 617 quoted_uninstall_cmd.GetCommandLineString(), true); |
| 618 install_list->AddSetRegValueWorkItem(reg_root, | 618 install_list->AddSetRegValueWorkItem(reg_root, |
| 619 uninstall_reg, | 619 uninstall_reg, |
| 620 L"InstallLocation", | 620 L"InstallLocation", |
| 621 install_path.value(), | 621 install_path.value(), |
| 622 true); | 622 true); |
| 623 | 623 |
| 624 // TODO(huangs): Generalize this, so app_host.exe can get its own icon, | 624 BrowserDistribution* dist = product.distribution(); |
| 625 // and not rely on chrome.exe's. | 625 string16 chrome_icon = ShellUtil::FormatIconLocation( |
| 626 // DisplayIcon, NoModify and NoRepair | 626 install_path.Append(dist->GetIconFilename()).value(), |
| 627 string16 chrome_icon = ShellUtil::GetChromeIcon( | 627 dist->GetIconIndex()); |
| 628 product.distribution(), | |
| 629 install_path.Append(installer::kChromeExe).value()); | |
| 630 install_list->AddSetRegValueWorkItem(reg_root, uninstall_reg, | 628 install_list->AddSetRegValueWorkItem(reg_root, uninstall_reg, |
| 631 L"DisplayIcon", chrome_icon, true); | 629 L"DisplayIcon", chrome_icon, true); |
| 632 install_list->AddSetRegValueWorkItem(reg_root, uninstall_reg, | 630 install_list->AddSetRegValueWorkItem(reg_root, uninstall_reg, |
| 633 L"NoModify", static_cast<DWORD>(1), | 631 L"NoModify", static_cast<DWORD>(1), |
| 634 true); | 632 true); |
| 635 install_list->AddSetRegValueWorkItem(reg_root, uninstall_reg, | 633 install_list->AddSetRegValueWorkItem(reg_root, uninstall_reg, |
| 636 L"NoRepair", static_cast<DWORD>(1), | 634 L"NoRepair", static_cast<DWORD>(1), |
| 637 true); | 635 true); |
| 638 | 636 |
| 639 install_list->AddSetRegValueWorkItem(reg_root, uninstall_reg, | 637 install_list->AddSetRegValueWorkItem(reg_root, uninstall_reg, |
| (...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1613 // Log everything for now. | 1611 // Log everything for now. |
| 1614 cmd_line.AppendSwitch(installer::switches::kVerboseLogging); | 1612 cmd_line.AppendSwitch(installer::switches::kVerboseLogging); |
| 1615 | 1613 |
| 1616 AppCommand cmd(cmd_line.GetCommandLineString()); | 1614 AppCommand cmd(cmd_line.GetCommandLineString()); |
| 1617 cmd.set_is_auto_run_on_os_upgrade(true); | 1615 cmd.set_is_auto_run_on_os_upgrade(true); |
| 1618 cmd.AddWorkItems(installer_state.root_key(), cmd_key, install_list); | 1616 cmd.AddWorkItems(installer_state.root_key(), cmd_key, install_list); |
| 1619 } | 1617 } |
| 1620 } | 1618 } |
| 1621 | 1619 |
| 1622 } // namespace installer | 1620 } // namespace installer |
| OLD | NEW |