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

Side by Side Diff: chrome/installer/setup/install_worker.cc

Issue 2621713004: Remove *BinariesDistribution and ChromeBinariesOperations from installer_util. (Closed)
Patch Set: sync to position 442533 Created 3 years, 11 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 unified diff | Download patch
OLDNEW
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 <windows.h> // NOLINT 10 #include <windows.h> // NOLINT
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 true); 420 true);
421 install_list->AddSetRegValueWorkItem( 421 install_list->AddSetRegValueWorkItem(
422 reg_root, 422 reg_root,
423 update_state_key, 423 update_state_key,
424 KEY_WOW64_32KEY, 424 KEY_WOW64_32KEY,
425 installer::kUninstallArgumentsField, 425 installer::kUninstallArgumentsField,
426 uninstall_arguments.GetCommandLineString(), 426 uninstall_arguments.GetCommandLineString(),
427 true); 427 true);
428 428
429 // MSI installations will manage their own uninstall shortcuts. 429 // MSI installations will manage their own uninstall shortcuts.
430 if (!installer_state.is_msi() && product.ShouldCreateUninstallEntry()) { 430 if (!installer_state.is_msi()) {
431 // We need to quote the command line for the Add/Remove Programs dialog. 431 // We need to quote the command line for the Add/Remove Programs dialog.
432 base::CommandLine quoted_uninstall_cmd(installer_path); 432 base::CommandLine quoted_uninstall_cmd(installer_path);
433 DCHECK_EQ(quoted_uninstall_cmd.GetCommandLineString()[0], '"'); 433 DCHECK_EQ(quoted_uninstall_cmd.GetCommandLineString()[0], '"');
434 quoted_uninstall_cmd.AppendArguments(uninstall_arguments, false); 434 quoted_uninstall_cmd.AppendArguments(uninstall_arguments, false);
435 435
436 base::string16 uninstall_reg = browser_dist->GetUninstallRegPath(); 436 base::string16 uninstall_reg = browser_dist->GetUninstallRegPath();
437 install_list->AddCreateRegKeyWorkItem( 437 install_list->AddCreateRegKeyWorkItem(
438 reg_root, uninstall_reg, KEY_WOW64_32KEY); 438 reg_root, uninstall_reg, KEY_WOW64_32KEY);
439 install_list->AddSetRegValueWorkItem(reg_root, 439 install_list->AddSetRegValueWorkItem(reg_root,
440 uninstall_reg, 440 uninstall_reg,
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 // If we're told that we're an MSI install, make sure to set the marker 662 // If we're told that we're an MSI install, make sure to set the marker
663 // in the client state key so that future updates do the right thing. 663 // in the client state key so that future updates do the right thing.
664 if (installer_state.is_msi()) { 664 if (installer_state.is_msi()) {
665 const Product& product = installer_state.product(); 665 const Product& product = installer_state.product();
666 AddSetMsiMarkerWorkItem(installer_state, product.distribution(), true, 666 AddSetMsiMarkerWorkItem(installer_state, product.distribution(), true,
667 post_install_task_list); 667 post_install_task_list);
668 668
669 // We want MSI installs to take over the Add/Remove Programs entry. Make a 669 // We want MSI installs to take over the Add/Remove Programs entry. Make a
670 // best-effort attempt to delete any entry left over from previous non-MSI 670 // best-effort attempt to delete any entry left over from previous non-MSI
671 // installations for the same type of install (system or per user). 671 // installations for the same type of install (system or per user).
672 if (product.ShouldCreateUninstallEntry()) { 672 AddDeleteUninstallEntryForMSIWorkItems(installer_state, product,
673 AddDeleteUninstallEntryForMSIWorkItems(installer_state, product, 673 post_install_task_list);
674 post_install_task_list);
675 }
676 } 674 }
677 675
678 return true; 676 return true;
679 } 677 }
680 678
681 void AddInstallWorkItems(const InstallationState& original_state, 679 void AddInstallWorkItems(const InstallationState& original_state,
682 const InstallerState& installer_state, 680 const InstallerState& installer_state,
683 const base::FilePath& setup_path, 681 const base::FilePath& setup_path,
684 const base::FilePath& archive_path, 682 const base::FilePath& archive_path,
685 const base::FilePath& src_path, 683 const base::FilePath& src_path,
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 // Log everything for now. 897 // Log everything for now.
900 cmd_line.AppendSwitch(installer::switches::kVerboseLogging); 898 cmd_line.AppendSwitch(installer::switches::kVerboseLogging);
901 899
902 AppCommand cmd(cmd_line.GetCommandLineString()); 900 AppCommand cmd(cmd_line.GetCommandLineString());
903 cmd.set_is_auto_run_on_os_upgrade(true); 901 cmd.set_is_auto_run_on_os_upgrade(true);
904 cmd.AddWorkItems(installer_state.root_key(), cmd_key, install_list); 902 cmd.AddWorkItems(installer_state.root_key(), cmd_key, install_list);
905 } 903 }
906 } 904 }
907 905
908 } // namespace installer 906 } // namespace installer
OLDNEW
« no previous file with comments | « no previous file | chrome/installer/setup/uninstall.cc » ('j') | chrome/installer/util/browser_distribution.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698