| 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 declarations of the installer functions that build | 5 // This file contains the declarations 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 #ifndef CHROME_INSTALLER_SETUP_INSTALL_WORKER_H_ | 8 #ifndef CHROME_INSTALLER_SETUP_INSTALL_WORKER_H_ |
| 9 #define CHROME_INSTALLER_SETUP_INSTALL_WORKER_H_ | 9 #define CHROME_INSTALLER_SETUP_INSTALL_WORKER_H_ |
| 10 | 10 |
| 11 #include <windows.h> | 11 #include <windows.h> |
| 12 | 12 |
| 13 #include <vector> | |
| 14 | |
| 15 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
| 16 | 14 |
| 17 class BrowserDistribution; | 15 class BrowserDistribution; |
| 18 class WorkItemList; | 16 class WorkItemList; |
| 19 | 17 |
| 20 namespace base { | 18 namespace base { |
| 21 class CommandLine; | 19 class CommandLine; |
| 22 class FilePath; | 20 class FilePath; |
| 23 class Version; | 21 class Version; |
| 24 } | 22 } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 41 // Creates Version key for a product (if not already present) and sets the new | 39 // Creates Version key for a product (if not already present) and sets the new |
| 42 // product version as the last step. If |add_language_identifier| is true, the | 40 // product version as the last step. If |add_language_identifier| is true, the |
| 43 // "lang" value is also set according to the currently selected translation. | 41 // "lang" value is also set according to the currently selected translation. |
| 44 void AddVersionKeyWorkItems(HKEY root, | 42 void AddVersionKeyWorkItems(HKEY root, |
| 45 const base::string16& version_key, | 43 const base::string16& version_key, |
| 46 const base::string16& product_name, | 44 const base::string16& product_name, |
| 47 const base::Version& new_version, | 45 const base::Version& new_version, |
| 48 bool add_language_identifier, | 46 bool add_language_identifier, |
| 49 WorkItemList* list); | 47 WorkItemList* list); |
| 50 | 48 |
| 51 // Helper function for AddGoogleUpdateWorkItems that mirrors oeminstall. | |
| 52 void AddOemInstallWorkItems(const InstallationState& original_state, | |
| 53 const InstallerState& installer_state, | |
| 54 WorkItemList* install_list); | |
| 55 | |
| 56 // Helper function for AddGoogleUpdateWorkItems that mirrors eulaaccepted. | |
| 57 void AddEulaAcceptedWorkItems(const InstallationState& original_state, | |
| 58 const InstallerState& installer_state, | |
| 59 WorkItemList* install_list); | |
| 60 | |
| 61 // Adds work items that make registry adjustments for Google Update; namely, | |
| 62 // copy brand, oeminstall, and eulaaccepted values; and move a usagestats value. | |
| 63 void AddGoogleUpdateWorkItems(const InstallationState& original_state, | |
| 64 const InstallerState& installer_state, | |
| 65 WorkItemList* install_list); | |
| 66 | |
| 67 // Adds work items that make registry adjustments for stats and crash | |
| 68 // collection. When a product is installed, Google Update may write a | |
| 69 // "usagestats" value to Chrome or Chrome Frame's ClientState key. In the | |
| 70 // multi-install case, both products will consult/modify stats for the binaries' | |
| 71 // app guid. Consequently, during install and update we will move a | |
| 72 // product-specific value into the binaries' ClientState key. | |
| 73 void AddUsageStatsWorkItems(const InstallationState& original_state, | |
| 74 const InstallerState& installer_state, | |
| 75 WorkItemList* install_list); | |
| 76 | |
| 77 // After a successful copying of all the files, this function is called to | 49 // After a successful copying of all the files, this function is called to |
| 78 // do a few post install tasks: | 50 // do a few post install tasks: |
| 79 // - Handle the case of in-use-update by updating "opv" (old version) key or | 51 // - Handle the case of in-use-update by updating "opv" (old version) key or |
| 80 // deleting it if not required. | 52 // deleting it if not required. |
| 81 // - Register any new dlls and unregister old dlls. | 53 // - Register any new dlls and unregister old dlls. |
| 82 // - If this is an MSI install, ensures that the MSI marker is set, and sets | 54 // - If this is an MSI install, ensures that the MSI marker is set, and sets |
| 83 // it if not. | 55 // it if not. |
| 84 // If these operations are successful, the function returns true, otherwise | 56 // If these operations are successful, the function returns true, otherwise |
| 85 // false. | 57 // false. |
| 86 // |current_version| can be NULL to indicate no Chrome is currently installed. | 58 // |current_version| can be NULL to indicate no Chrome is currently installed. |
| (...skipping 19 matching lines...) Expand all Loading... |
| 106 void AddInstallWorkItems(const InstallationState& original_state, | 78 void AddInstallWorkItems(const InstallationState& original_state, |
| 107 const InstallerState& installer_state, | 79 const InstallerState& installer_state, |
| 108 const base::FilePath& setup_path, | 80 const base::FilePath& setup_path, |
| 109 const base::FilePath& archive_path, | 81 const base::FilePath& archive_path, |
| 110 const base::FilePath& src_path, | 82 const base::FilePath& src_path, |
| 111 const base::FilePath& temp_path, | 83 const base::FilePath& temp_path, |
| 112 const base::Version* current_version, | 84 const base::Version* current_version, |
| 113 const base::Version& new_version, | 85 const base::Version& new_version, |
| 114 WorkItemList* install_list); | 86 WorkItemList* install_list); |
| 115 | 87 |
| 116 // Appends registration or unregistration work items to |work_item_list| for the | |
| 117 // COM DLLs whose file names are given in |dll_files| and which reside in the | |
| 118 // path |dll_folder|. | |
| 119 // |system_level| specifies whether to call the system or user level DLL | |
| 120 // registration entry points. | |
| 121 // |do_register| says whether to register or unregister. | |
| 122 // If |best_effort| is true, registration or unregistration failure doesn't | |
| 123 // cause failure of |work_item_list|. | |
| 124 void AddRegisterComDllWorkItems(const base::FilePath& dll_folder, | |
| 125 const std::vector<base::FilePath>& dll_files, | |
| 126 bool system_level, | |
| 127 bool do_register, | |
| 128 bool best_effort, | |
| 129 WorkItemList* work_item_list); | |
| 130 | |
| 131 void AddSetMsiMarkerWorkItem(const InstallerState& installer_state, | 88 void AddSetMsiMarkerWorkItem(const InstallerState& installer_state, |
| 132 BrowserDistribution* dist, | 89 BrowserDistribution* dist, |
| 133 bool set, | 90 bool set, |
| 134 WorkItemList* work_item_list); | 91 WorkItemList* work_item_list); |
| 135 | 92 |
| 136 // Adds work items to cleanup deprecated per-user registrations. | 93 // Adds work items to cleanup deprecated per-user registrations. |
| 137 void AddCleanupDeprecatedPerUserRegistrationsWorkItems(const Product& product, | 94 void AddCleanupDeprecatedPerUserRegistrationsWorkItems(const Product& product, |
| 138 WorkItemList* list); | 95 WorkItemList* list); |
| 139 | 96 |
| 140 // Adds Active Setup registration for sytem-level setup to be called by Windows | 97 // Adds Active Setup registration for sytem-level setup to be called by Windows |
| 141 // on user-login post-install/update. | 98 // on user-login post-install/update. |
| 142 // This method should be called for installation only. | 99 // This method should be called for installation only. |
| 143 // |product|: The product being installed. This method is a no-op if this is | 100 // |product|: The product being installed. This method is a no-op if this is |
| 144 // anything other than system-level Chrome/Chromium. | 101 // anything other than system-level Chrome/Chromium. |
| 145 void AddActiveSetupWorkItems(const InstallerState& installer_state, | 102 void AddActiveSetupWorkItems(const InstallerState& installer_state, |
| 146 const base::Version& new_version, | 103 const base::Version& new_version, |
| 147 const Product& product, | 104 const Product& product, |
| 148 WorkItemList* list); | 105 WorkItemList* list); |
| 149 | 106 |
| 150 // Unregisters the "opv" version of ChromeLauncher from IE's low rights | |
| 151 // elevation policy. | |
| 152 void AddDeleteOldIELowRightsPolicyWorkItems( | |
| 153 const InstallerState& installer_state, | |
| 154 WorkItemList* install_list); | |
| 155 | |
| 156 // Utility method currently shared between install.cc and install_worker.cc | 107 // Utility method currently shared between install.cc and install_worker.cc |
| 157 void AppendUninstallCommandLineFlags(const InstallerState& installer_state, | 108 void AppendUninstallCommandLineFlags(const InstallerState& installer_state, |
| 158 const Product& product, | 109 const Product& product, |
| 159 base::CommandLine* uninstall_cmd); | 110 base::CommandLine* uninstall_cmd); |
| 160 | 111 |
| 161 // Refreshes the elevation policy on platforms where it is supported. | |
| 162 void RefreshElevationPolicy(); | |
| 163 | |
| 164 // Adds work items to add or remove the "on-os-upgrade" command to |product|'s | 112 // Adds work items to add or remove the "on-os-upgrade" command to |product|'s |
| 165 // version key on the basis of the current operation (represented in | 113 // version key on the basis of the current operation (represented in |
| 166 // |installer_state|). |new_version| is the version of the product(s) | 114 // |installer_state|). |new_version| is the version of the product(s) |
| 167 // currently being installed -- can be empty on uninstall. | 115 // currently being installed -- can be empty on uninstall. |
| 168 void AddOsUpgradeWorkItems(const InstallerState& installer_state, | 116 void AddOsUpgradeWorkItems(const InstallerState& installer_state, |
| 169 const base::FilePath& setup_path, | 117 const base::FilePath& setup_path, |
| 170 const base::Version& new_version, | 118 const base::Version& new_version, |
| 171 const Product& product, | 119 const Product& product, |
| 172 WorkItemList* install_list); | 120 WorkItemList* install_list); |
| 173 | 121 |
| 174 // Adds work items to remove "quick-enable-cf" from the multi-installer | |
| 175 // binaries' version key. | |
| 176 void AddQuickEnableChromeFrameWorkItems(const InstallerState& installer_state, | |
| 177 WorkItemList* work_item_list); | |
| 178 | |
| 179 } // namespace installer | 122 } // namespace installer |
| 180 | 123 |
| 181 #endif // CHROME_INSTALLER_SETUP_INSTALL_WORKER_H_ | 124 #endif // CHROME_INSTALLER_SETUP_INSTALL_WORKER_H_ |
| OLD | NEW |