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

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

Issue 2933043002: Installer support for Windows 10 inactive user toast. (Closed)
Patch Set: review feedback Created 3 years, 6 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
« no previous file with comments | « chrome/installer/setup/install.cc ('k') | chrome/installer/setup/setup_constants.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 10 matching lines...) Expand all
21 #include "base/bind.h" 21 #include "base/bind.h"
22 #include "base/command_line.h" 22 #include "base/command_line.h"
23 #include "base/files/file_path.h" 23 #include "base/files/file_path.h"
24 #include "base/files/file_util.h" 24 #include "base/files/file_util.h"
25 #include "base/logging.h" 25 #include "base/logging.h"
26 #include "base/strings/string_util.h" 26 #include "base/strings/string_util.h"
27 #include "base/strings/utf_string_conversions.h" 27 #include "base/strings/utf_string_conversions.h"
28 #include "base/version.h" 28 #include "base/version.h"
29 #include "base/win/registry.h" 29 #include "base/win/registry.h"
30 #include "chrome/install_static/install_details.h" 30 #include "chrome/install_static/install_details.h"
31 #include "chrome/install_static/install_modes.h"
31 #include "chrome/install_static/install_util.h" 32 #include "chrome/install_static/install_util.h"
32 #include "chrome/installer/setup/installer_state.h" 33 #include "chrome/installer/setup/installer_state.h"
33 #include "chrome/installer/setup/persistent_histogram_storage.h" 34 #include "chrome/installer/setup/persistent_histogram_storage.h"
34 #include "chrome/installer/setup/setup_constants.h" 35 #include "chrome/installer/setup/setup_constants.h"
35 #include "chrome/installer/setup/setup_util.h" 36 #include "chrome/installer/setup/setup_util.h"
36 #include "chrome/installer/setup/update_active_setup_version_work_item.h" 37 #include "chrome/installer/setup/update_active_setup_version_work_item.h"
37 #include "chrome/installer/util/app_registration_data.h" 38 #include "chrome/installer/util/app_registration_data.h"
38 #include "chrome/installer/util/browser_distribution.h" 39 #include "chrome/installer/util/browser_distribution.h"
39 #include "chrome/installer/util/callback_work_item.h" 40 #include "chrome/installer/util/callback_work_item.h"
40 #include "chrome/installer/util/conditional_work_item_list.h" 41 #include "chrome/installer/util/conditional_work_item_list.h"
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 AddSetMsiMarkerWorkItem(installer_state, product.distribution(), true, 653 AddSetMsiMarkerWorkItem(installer_state, product.distribution(), true,
653 post_install_task_list); 654 post_install_task_list);
654 655
655 // We want MSI installs to take over the Add/Remove Programs entry. Make a 656 // We want MSI installs to take over the Add/Remove Programs entry. Make a
656 // best-effort attempt to delete any entry left over from previous non-MSI 657 // best-effort attempt to delete any entry left over from previous non-MSI
657 // installations for the same type of install (system or per user). 658 // installations for the same type of install (system or per user).
658 AddDeleteUninstallEntryForMSIWorkItems(installer_state, product, 659 AddDeleteUninstallEntryForMSIWorkItems(installer_state, product,
659 post_install_task_list); 660 post_install_task_list);
660 } 661 }
661 662
663 // Add a best-effort item to create the ClientStateMedium key for system-level
664 // installs. This is ordinarily done by Google Update prior to running
665 // Chrome's installer. Do it here as well so that the key exists for manual
666 // installs.
667 if (install_static::kUseGoogleUpdateIntegration &&
668 installer_state.system_install()) {
669 const base::string16 path =
670 install_static::InstallDetails::Get().GetClientStateMediumKeyPath();
671 post_install_task_list
672 ->AddCreateRegKeyWorkItem(HKEY_LOCAL_MACHINE, path, KEY_WOW64_32KEY)
673 ->set_best_effort(true);
674 }
675
662 return true; 676 return true;
663 } 677 }
664 678
665 void AddInstallWorkItems(const InstallationState& original_state, 679 void AddInstallWorkItems(const InstallationState& original_state,
666 const InstallerState& installer_state, 680 const InstallerState& installer_state,
667 const base::FilePath& setup_path, 681 const base::FilePath& setup_path,
668 const base::FilePath& archive_path, 682 const base::FilePath& archive_path,
669 const base::FilePath& src_path, 683 const base::FilePath& src_path,
670 const base::FilePath& temp_path, 684 const base::FilePath& temp_path,
671 const base::Version* current_version, 685 const base::Version* current_version,
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
882 // Log everything for now. 896 // Log everything for now.
883 cmd_line.AppendSwitch(installer::switches::kVerboseLogging); 897 cmd_line.AppendSwitch(installer::switches::kVerboseLogging);
884 898
885 AppCommand cmd(cmd_line.GetCommandLineString()); 899 AppCommand cmd(cmd_line.GetCommandLineString());
886 cmd.set_is_auto_run_on_os_upgrade(true); 900 cmd.set_is_auto_run_on_os_upgrade(true);
887 cmd.AddWorkItems(installer_state.root_key(), cmd_key, install_list); 901 cmd.AddWorkItems(installer_state.root_key(), cmd_key, install_list);
888 } 902 }
889 } 903 }
890 904
891 } // namespace installer 905 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/installer/setup/install.cc ('k') | chrome/installer/setup/setup_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698