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

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

Issue 14099010: Move Version to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/common/extensions/extension.h ('k') | chrome/installer/setup/setup_util.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 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> 13 #include <vector>
14 14
15 class BrowserDistribution; 15 class BrowserDistribution;
16 class CommandLine; 16 class CommandLine;
17 class Version;
18 class WorkItemList; 17 class WorkItemList;
19 18
20 namespace base { 19 namespace base {
21 class FilePath; 20 class FilePath;
21 class Version;
22 } 22 }
23 23
24 namespace installer { 24 namespace installer {
25 25
26 class InstallationState; 26 class InstallationState;
27 class InstallerState; 27 class InstallerState;
28 class Product; 28 class Product;
29 29
30 // This method adds work items to create (or update) Chrome uninstall entry in 30 // This method adds work items to create (or update) Chrome uninstall entry in
31 // either the Control Panel->Add/Remove Programs list or in the Omaha client 31 // either the Control Panel->Add/Remove Programs list or in the Omaha client
32 // state key if running under an MSI installer. 32 // state key if running under an MSI installer.
33 void AddUninstallShortcutWorkItems(const InstallerState& installer_state, 33 void AddUninstallShortcutWorkItems(const InstallerState& installer_state,
34 const base::FilePath& setup_path, 34 const base::FilePath& setup_path,
35 const Version& new_version, 35 const base::Version& new_version,
36 const Product& product, 36 const Product& product,
37 WorkItemList* install_list); 37 WorkItemList* install_list);
38 38
39 // 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
40 // 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
41 // "lang" value is also set according to the currently selected translation. 41 // "lang" value is also set according to the currently selected translation.
42 void AddVersionKeyWorkItems(HKEY root, 42 void AddVersionKeyWorkItems(HKEY root,
43 BrowserDistribution* dist, 43 BrowserDistribution* dist,
44 const Version& new_version, 44 const base::Version& new_version,
45 bool add_language_identifier, 45 bool add_language_identifier,
46 WorkItemList* list); 46 WorkItemList* list);
47 47
48 // Helper function for AddGoogleUpdateWorkItems that mirrors oeminstall. 48 // Helper function for AddGoogleUpdateWorkItems that mirrors oeminstall.
49 void AddOemInstallWorkItems(const InstallationState& original_state, 49 void AddOemInstallWorkItems(const InstallationState& original_state,
50 const InstallerState& installer_state, 50 const InstallerState& installer_state,
51 WorkItemList* install_list); 51 WorkItemList* install_list);
52 52
53 // Helper function for AddGoogleUpdateWorkItems that mirrors eulaaccepted. 53 // Helper function for AddGoogleUpdateWorkItems that mirrors eulaaccepted.
54 void AddEulaAcceptedWorkItems(const InstallationState& original_state, 54 void AddEulaAcceptedWorkItems(const InstallationState& original_state,
(...skipping 21 matching lines...) Expand all
76 // - Handle the case of in-use-update by updating "opv" (old version) key or 76 // - Handle the case of in-use-update by updating "opv" (old version) key or
77 // deleting it if not required. 77 // deleting it if not required.
78 // - Register any new dlls and unregister old dlls. 78 // - Register any new dlls and unregister old dlls.
79 // - If this is an MSI install, ensures that the MSI marker is set, and sets 79 // - If this is an MSI install, ensures that the MSI marker is set, and sets
80 // it if not. 80 // it if not.
81 // If these operations are successful, the function returns true, otherwise 81 // If these operations are successful, the function returns true, otherwise
82 // false. 82 // false.
83 // |current_version| can be NULL to indicate no Chrome is currently installed. 83 // |current_version| can be NULL to indicate no Chrome is currently installed.
84 bool AppendPostInstallTasks(const InstallerState& installer_state, 84 bool AppendPostInstallTasks(const InstallerState& installer_state,
85 const base::FilePath& setup_path, 85 const base::FilePath& setup_path,
86 const Version* current_version, 86 const base::Version* current_version,
87 const Version& new_version, 87 const base::Version& new_version,
88 const base::FilePath& temp_path, 88 const base::FilePath& temp_path,
89 WorkItemList* post_install_task_list); 89 WorkItemList* post_install_task_list);
90 90
91 // Builds the complete WorkItemList used to build the set of installation steps 91 // Builds the complete WorkItemList used to build the set of installation steps
92 // needed to lay down one or more installed products. 92 // needed to lay down one or more installed products.
93 // 93 //
94 // setup_path: Path to the executable (setup.exe) as it will be copied 94 // setup_path: Path to the executable (setup.exe) as it will be copied
95 // to Chrome install folder after install is complete 95 // to Chrome install folder after install is complete
96 // archive_path: Path to the archive (chrome.7z) as it will be copied 96 // archive_path: Path to the archive (chrome.7z) as it will be copied
97 // to Chrome install folder after install is complete 97 // to Chrome install folder after install is complete
98 // src_path: the path that contains a complete and unpacked Chrome package 98 // src_path: the path that contains a complete and unpacked Chrome package
99 // to be installed. 99 // to be installed.
100 // temp_path: the path of working directory used during installation. This path 100 // temp_path: the path of working directory used during installation. This path
101 // does not need to exist. 101 // does not need to exist.
102 // |current_version| can be NULL to indicate no Chrome is currently installed. 102 // |current_version| can be NULL to indicate no Chrome is currently installed.
103 void AddInstallWorkItems(const InstallationState& original_state, 103 void AddInstallWorkItems(const InstallationState& original_state,
104 const InstallerState& installer_state, 104 const InstallerState& installer_state,
105 const base::FilePath& setup_path, 105 const base::FilePath& setup_path,
106 const base::FilePath& archive_path, 106 const base::FilePath& archive_path,
107 const base::FilePath& src_path, 107 const base::FilePath& src_path,
108 const base::FilePath& temp_path, 108 const base::FilePath& temp_path,
109 const Version* current_version, 109 const base::Version* current_version,
110 const Version& new_version, 110 const base::Version& new_version,
111 WorkItemList* install_list); 111 WorkItemList* install_list);
112 112
113 // Appends registration or unregistration work items to |work_item_list| for the 113 // Appends registration or unregistration work items to |work_item_list| for the
114 // COM DLLs whose file names are given in |dll_files| and which reside in the 114 // COM DLLs whose file names are given in |dll_files| and which reside in the
115 // path |dll_folder|. 115 // path |dll_folder|.
116 // |system_level| specifies whether to call the system or user level DLL 116 // |system_level| specifies whether to call the system or user level DLL
117 // registration entry points. 117 // registration entry points.
118 // |do_register| says whether to register or unregister. 118 // |do_register| says whether to register or unregister.
119 // |may_fail| states whether this is best effort or not. If |may_fail| is true 119 // |may_fail| states whether this is best effort or not. If |may_fail| is true
120 // then |work_item_list| will still succeed if the registration fails and 120 // then |work_item_list| will still succeed if the registration fails and
121 // no registration rollback will be performed. 121 // no registration rollback will be performed.
122 void AddRegisterComDllWorkItems(const base::FilePath& dll_folder, 122 void AddRegisterComDllWorkItems(const base::FilePath& dll_folder,
123 const std::vector<base::FilePath>& dll_files, 123 const std::vector<base::FilePath>& dll_files,
124 bool system_level, 124 bool system_level,
125 bool do_register, 125 bool do_register,
126 bool ignore_failures, 126 bool ignore_failures,
127 WorkItemList* work_item_list); 127 WorkItemList* work_item_list);
128 128
129 void AddSetMsiMarkerWorkItem(const InstallerState& installer_state, 129 void AddSetMsiMarkerWorkItem(const InstallerState& installer_state,
130 BrowserDistribution* dist, 130 BrowserDistribution* dist,
131 bool set, 131 bool set,
132 WorkItemList* work_item_list); 132 WorkItemList* work_item_list);
133 133
134 // Called for either installation or uninstallation. This method updates the 134 // Called for either installation or uninstallation. This method updates the
135 // registry according to Chrome Frame specific options for the current 135 // registry according to Chrome Frame specific options for the current
136 // installation. This includes handling of the ready-mode option. 136 // installation. This includes handling of the ready-mode option.
137 void AddChromeFrameWorkItems(const InstallationState& original_state, 137 void AddChromeFrameWorkItems(const InstallationState& original_state,
138 const InstallerState& installer_state, 138 const InstallerState& installer_state,
139 const base::FilePath& setup_path, 139 const base::FilePath& setup_path,
140 const Version& new_version, 140 const base::Version& new_version,
141 const Product& product, 141 const Product& product,
142 WorkItemList* list); 142 WorkItemList* list);
143 143
144 // Called for either installation or uninstallation. This method adds or 144 // Called for either installation or uninstallation. This method adds or
145 // removes COM registration for a product's DelegateExecute verb handler. 145 // removes COM registration for a product's DelegateExecute verb handler.
146 // If |new_version| is empty, the registrations will point to 146 // If |new_version| is empty, the registrations will point to
147 // delegate_execute.exe directly in |target_path|. 147 // delegate_execute.exe directly in |target_path|.
148 void AddDelegateExecuteWorkItems(const InstallerState& installer_state, 148 void AddDelegateExecuteWorkItems(const InstallerState& installer_state,
149 const base::FilePath& target_path, 149 const base::FilePath& target_path,
150 const Version& new_version, 150 const base::Version& new_version,
151 const Product& product, 151 const Product& product,
152 WorkItemList* list); 152 WorkItemList* list);
153 153
154 // Adds Active Setup registration for sytem-level setup to be called by Windows 154 // Adds Active Setup registration for sytem-level setup to be called by Windows
155 // on user-login post-install/update. 155 // on user-login post-install/update.
156 // This method should be called for installation only. 156 // This method should be called for installation only.
157 // |product|: The product being installed. This method is a no-op if this is 157 // |product|: The product being installed. This method is a no-op if this is
158 // anything other than system-level Chrome/Chromium. 158 // anything other than system-level Chrome/Chromium.
159 void AddActiveSetupWorkItems(const InstallerState& installer_state, 159 void AddActiveSetupWorkItems(const InstallerState& installer_state,
160 const base::FilePath& setup_path, 160 const base::FilePath& setup_path,
161 const Version& new_version, 161 const base::Version& new_version,
162 const Product& product, 162 const Product& product,
163 WorkItemList* list); 163 WorkItemList* list);
164 164
165 // Unregisters the "opv" version of ChromeLauncher from IE's low rights 165 // Unregisters the "opv" version of ChromeLauncher from IE's low rights
166 // elevation policy. 166 // elevation policy.
167 void AddDeleteOldIELowRightsPolicyWorkItems( 167 void AddDeleteOldIELowRightsPolicyWorkItems(
168 const InstallerState& installer_state, 168 const InstallerState& installer_state,
169 WorkItemList* install_list); 169 WorkItemList* install_list);
170 170
171 // Adds work items to copy IE low rights policies for an in-use update. 171 // Adds work items to copy IE low rights policies for an in-use update.
172 void AddCopyIELowRightsPolicyWorkItems(const InstallerState& installer_state, 172 void AddCopyIELowRightsPolicyWorkItems(const InstallerState& installer_state,
173 WorkItemList* install_list); 173 WorkItemList* install_list);
174 174
175 // Utility method currently shared between install.cc and install_worker.cc 175 // Utility method currently shared between install.cc and install_worker.cc
176 void AppendUninstallCommandLineFlags(const InstallerState& installer_state, 176 void AppendUninstallCommandLineFlags(const InstallerState& installer_state,
177 const Product& product, 177 const Product& product,
178 CommandLine* uninstall_cmd); 178 CommandLine* uninstall_cmd);
179 179
180 // Refreshes the elevation policy on platforms where it is supported. 180 // Refreshes the elevation policy on platforms where it is supported.
181 void RefreshElevationPolicy(); 181 void RefreshElevationPolicy();
182 182
183 // Adds work items to add or remove the "on-os-upgrade" command to |product|'s 183 // Adds work items to add or remove the "on-os-upgrade" command to |product|'s
184 // version key on the basis of the current operation (represented in 184 // version key on the basis of the current operation (represented in
185 // |installer_state|). |new_version| is the version of the product(s) 185 // |installer_state|). |new_version| is the version of the product(s)
186 // currently being installed -- can be empty on uninstall. 186 // currently being installed -- can be empty on uninstall.
187 void AddOsUpgradeWorkItems(const InstallerState& installer_state, 187 void AddOsUpgradeWorkItems(const InstallerState& installer_state,
188 const base::FilePath& setup_path, 188 const base::FilePath& setup_path,
189 const Version& new_version, 189 const base::Version& new_version,
190 const Product& product, 190 const Product& product,
191 WorkItemList* install_list); 191 WorkItemList* install_list);
192 192
193 // Adds work items to add or remove the "query-eula-acceptance" command to 193 // Adds work items to add or remove the "query-eula-acceptance" command to
194 // |product|'s version key on the basis of the current operation (represented 194 // |product|'s version key on the basis of the current operation (represented
195 // in |installer_state|). |new_version| is the version of the product(s) 195 // in |installer_state|). |new_version| is the version of the product(s)
196 // currently being installed -- can be empty on uninstall. 196 // currently being installed -- can be empty on uninstall.
197 void AddQueryEULAAcceptanceWorkItems(const InstallerState& installer_state, 197 void AddQueryEULAAcceptanceWorkItems(const InstallerState& installer_state,
198 const base::FilePath& setup_path, 198 const base::FilePath& setup_path,
199 const Version& new_version, 199 const base::Version& new_version,
200 const Product& product, 200 const Product& product,
201 WorkItemList* work_item_list); 201 WorkItemList* work_item_list);
202 202
203 // Adds work items to add or remove the "quick-enable-cf" to the multi-installer 203 // Adds work items to add or remove the "quick-enable-cf" to the multi-installer
204 // binaries' version key on the basis of the current operation (represented in 204 // binaries' version key on the basis of the current operation (represented in
205 // |installer_state|) and the pre-existing machine configuration (represented in 205 // |installer_state|) and the pre-existing machine configuration (represented in
206 // |machine_state|). |setup_path| (the path to the executable currently being 206 // |machine_state|). |setup_path| (the path to the executable currently being
207 // run) and |new_version| (the version of the product(s) currently being 207 // run) and |new_version| (the version of the product(s) currently being
208 // installed) are required when processing product installation; they are unused 208 // installed) are required when processing product installation; they are unused
209 // (and may therefore be empty) when uninstalling. 209 // (and may therefore be empty) when uninstalling.
210 void AddQuickEnableChromeFrameWorkItems(const InstallerState& installer_state, 210 void AddQuickEnableChromeFrameWorkItems(const InstallerState& installer_state,
211 const InstallationState& machine_state, 211 const InstallationState& machine_state,
212 const base::FilePath& setup_path, 212 const base::FilePath& setup_path,
213 const Version& new_version, 213 const base::Version& new_version,
214 WorkItemList* work_item_list); 214 WorkItemList* work_item_list);
215 215
216 } // namespace installer 216 } // namespace installer
217 217
218 #endif // CHROME_INSTALLER_SETUP_INSTALL_WORKER_H_ 218 #endif // CHROME_INSTALLER_SETUP_INSTALL_WORKER_H_
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension.h ('k') | chrome/installer/setup/setup_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698