Add new certificateProvider extension API.
[chromium-blink-merge.git] / chrome / installer / util / util_constants.h
blob389da42dfaf8fa782b821f829eef9d887d1d3288
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
3 // found in the LICENSE file.
4 //
5 // Defines all install related constants that need to be used by Chrome as
6 // well as Chrome Installer.
8 #ifndef CHROME_INSTALLER_UTIL_UTIL_CONSTANTS_H_
9 #define CHROME_INSTALLER_UTIL_UTIL_CONSTANTS_H_
11 #include "base/basictypes.h"
13 namespace installer {
15 // Return status of installer. Values in this enum must not change. Always add
16 // to the end. When removing an unused value, retain the deprecated name and
17 // value in a comment for posterity's sake, but take the liberty of removing the
18 // old doc string.
19 enum InstallStatus {
20 FIRST_INSTALL_SUCCESS = 0, // First install of Chrome succeeded.
21 INSTALL_REPAIRED = 1, // Same version reinstalled for repair.
22 NEW_VERSION_UPDATED = 2, // Chrome successfully updated to new version.
23 EXISTING_VERSION_LAUNCHED = 3, // No work done; launched existing Chrome.
24 HIGHER_VERSION_EXISTS = 4, // Higher version of Chrome already exists
25 USER_LEVEL_INSTALL_EXISTS = 5, // User level install already exists.
26 SYSTEM_LEVEL_INSTALL_EXISTS = 6, // Machine level install already exists.
27 INSTALL_FAILED = 7, // Install/update failed.
28 SETUP_PATCH_FAILED = 8, // Failed to patch setup.exe.
29 OS_NOT_SUPPORTED = 9, // Current OS not supported.
30 OS_ERROR = 10, // OS API call failed.
31 TEMP_DIR_FAILED = 11, // Unable to get Temp directory.
32 UNCOMPRESSION_FAILED = 12, // Failed to uncompress Chrome archive.
33 INVALID_ARCHIVE = 13, // Something wrong with the installer archive.
34 INSUFFICIENT_RIGHTS = 14, // User trying system level install is not Admin.
35 CHROME_NOT_INSTALLED = 15, // Chrome not installed (returned in case of
36 // uninstall).
37 CHROME_RUNNING = 16, // Chrome currently running (when trying to
38 // uninstall).
39 UNINSTALL_CONFIRMED = 17, // User has confirmed Chrome uninstall.
40 UNINSTALL_DELETE_PROFILE = 18, // User okayed uninstall and profile deletion.
41 UNINSTALL_SUCCESSFUL = 19, // Chrome successfully uninstalled.
42 UNINSTALL_FAILED = 20, // Chrome uninstallation failed.
43 UNINSTALL_CANCELLED = 21, // User cancelled Chrome uninstallation.
44 UNKNOWN_STATUS = 22, // Unknown status (this should never happen).
45 RENAME_SUCCESSFUL = 23, // Rename of new_chrome.exe to chrome.exe worked.
46 RENAME_FAILED = 24, // Rename of new_chrome.exe failed.
47 EULA_REJECTED = 25, // EULA dialog was not accepted by user.
48 EULA_ACCEPTED = 26, // EULA dialog was accepted by user.
49 EULA_ACCEPTED_OPT_IN = 27, // EULA accepted with the crash option selected.
50 INSTALL_DIR_IN_USE = 28, // Installation directory is in use by another
51 // process
52 UNINSTALL_REQUIRES_REBOOT = 29, // Uninstallation required a reboot.
53 IN_USE_UPDATED = 30, // Chrome successfully updated but old version
54 // running.
55 SAME_VERSION_REPAIR_FAILED = 31, // Chrome repair failed as Chrome was
56 // running.
57 REENTRY_SYS_UPDATE = 32, // Setup has been re-launched as the interactive
58 // user.
59 SXS_OPTION_NOT_SUPPORTED = 33, // The chrome-sxs option provided does not
60 // work with other command line options.
61 // NON_MULTI_INSTALLATION_EXISTS = 34,
62 // MULTI_INSTALLATION_EXISTS = 35,
63 // READY_MODE_OPT_IN_FAILED = 36,
64 // READY_MODE_TEMP_OPT_OUT_FAILED = 37,
65 // READY_MODE_END_TEMP_OPT_OUT_FAILED = 38,
66 // CONFLICTING_CHANNEL_EXISTS = 39,
67 // READY_MODE_REQUIRES_CHROME = 40,
68 // APP_HOST_REQUIRES_MULTI_INSTALL = 41,
69 APPLY_DIFF_PATCH_FAILED = 42, // Failed to apply a diff patch.
70 // INCONSISTENT_UPDATE_POLICY = 43,
71 // APP_HOST_REQUIRES_USER_LEVEL = 44,
72 // APP_HOST_REQUIRES_BINARIES = 45,
73 // INSTALL_OF_GOOGLE_UPDATE_FAILED = 46,
74 INVALID_STATE_FOR_OPTION = 47, // A non-install option was called with an
75 // invalid installer state.
76 WAIT_FOR_EXISTING_FAILED = 48, // OS error waiting for existing setup.exe.
77 PATCH_INVALID_ARGUMENTS = 49, // The arguments of --patch were missing or
78 // they were invalid for any reason.
79 DIFF_PATCH_SOURCE_MISSING = 50, // No previous version archive found for
80 // differential update.
81 UNUSED_BINARIES = 51, // No multi-install products to update. The
82 // binaries will be uninstalled if they are not
83 // in use.
84 UNUSED_BINARIES_UNINSTALLED = 52, // The binaries were uninstalled.
85 UNSUPPORTED_OPTION = 53, // An unsupported legacy option was given.
86 CPU_NOT_SUPPORTED = 54, // Current OS not supported
87 REENABLE_UPDATES_SUCCEEDED = 55, // Autoupdates are now enabled.
88 REENABLE_UPDATES_FAILED = 56, // Autoupdates could not be enabled.
89 UNPACKING_FAILED = 57, // Unpacking the (possibly patched) uncompressed
90 // archive failed.
93 // The type of an update archive.
94 enum ArchiveType {
95 UNKNOWN_ARCHIVE_TYPE, // Unknown or uninitialized.
96 FULL_ARCHIVE_TYPE, // Full chrome.7z archive.
97 INCREMENTAL_ARCHIVE_TYPE // Incremental or differential archive.
100 // Stages of an installation reported through Google Update on failure.
101 // The order and value of existing enums must not change. Please add new
102 // values to the end (before NUM_STAGES) and update the compile assert below
103 // to assert on the last value added.
104 enum InstallerStage {
105 NO_STAGE, // 0: No stage to report.
106 PRECONDITIONS, // 1: Evaluating pre-install conditions.
107 UNCOMPRESSING, // 2: Uncompressing chrome.packed.7z.
108 ENSEMBLE_PATCHING, // 3: Patching chrome.7z using courgette.
109 BINARY_PATCHING, // 4: Patching chrome.7z using bspatch.
110 UNPACKING, // 5: Unpacking chrome.7z.
111 BUILDING, // 6: Building the install work item list.
112 EXECUTING, // 7: Executing the install work item list.
113 ROLLINGBACK, // 8: Rolling-back the install work item list.
114 REFRESHING_POLICY, // 9: Refreshing the elevation policy.
115 UPDATING_CHANNELS, // 10: Updating channel information.
116 COPYING_PREFERENCES_FILE, // 11: Copying preferences file.
117 CREATING_SHORTCUTS, // 12: Creating shortcuts.
118 REGISTERING_CHROME, // 13: Performing Chrome registration.
119 REMOVING_OLD_VERSIONS, // 14: Deleting old version directories.
120 FINISHING, // 15: Finishing the install.
121 CONFIGURE_AUTO_LAUNCH, // 16: Configuring Chrome to auto-launch.
122 CREATING_VISUAL_MANIFEST, // 17: Creating VisualElementsManifest.xml
123 DEFERRING_TO_HIGHER_VERSION, // 18: Deferring to an installed higher version.
124 UNINSTALLING_BINARIES, // 19: Uninstalling unused binaries.
125 UNINSTALLING_CHROME_FRAME, // 20: Uninstalling multi-install Chrome Frame.
126 NUM_STAGES // 21: The number of stages.
129 // When we start reporting the numerical values from the enum, the order
130 // above MUST be preserved.
131 COMPILE_ASSERT(UNINSTALLING_CHROME_FRAME == 20,
132 never_ever_ever_change_InstallerStage_values_bang);
134 namespace switches {
136 extern const char kAutoLaunchChrome[];
137 extern const char kChrome[];
138 extern const char kChromeFrame[];
139 extern const char kChromeSxS[];
140 extern const char kConfigureUserSettings[];
141 extern const char kCriticalUpdateVersion[];
142 extern const char kDeleteProfile[];
143 extern const char kDisableLogging[];
144 extern const char kDoNotLaunchChrome[];
145 extern const char kDoNotRegisterForUpdateLaunch[];
146 extern const char kDoNotRemoveSharedItems[];
147 extern const char kEnableLogging[];
148 extern const char kForceConfigureUserSettings[];
149 extern const char kForceUninstall[];
150 extern const char kInstallArchive[];
151 extern const char kInstallerData[];
152 extern const char kLogFile[];
153 extern const char kMakeChromeDefault[];
154 extern const char kMsi[];
155 extern const char kMultiInstall[];
156 extern const char kNewSetupExe[];
157 extern const char kOnOsUpgrade[];
158 extern const char kPreviousVersion[];
159 extern const char kReenableAutoupdates[];
160 extern const char kRegisterChromeBrowser[];
161 extern const char kRegisterChromeBrowserSuffix[];
162 extern const char kRegisterDevChrome[];
163 extern const char kRegisterURLProtocol[];
164 extern const char kRenameChromeExe[];
165 extern const char kRemoveChromeRegistration[];
166 extern const char kRunAsAdmin[];
167 extern const char kSelfDestruct[];
168 extern const char kSystemLevel[];
169 extern const char kTriggerActiveSetup[];
170 extern const char kUninstall[];
171 extern const char kUpdateSetupExe[];
172 extern const char kUncompressedArchive[];
173 extern const char kVerboseLogging[];
174 extern const char kShowEula[];
175 extern const char kShowEulaForMetro[];
176 extern const char kInactiveUserToast[];
177 extern const char kSystemLevelToast[];
178 extern const char kExperimentGroup[];
179 extern const char kToastResultsKey[];
180 extern const char kPatch[];
181 extern const char kInputFile[];
182 extern const char kPatchFile[];
183 extern const char kOutputFile[];
185 } // namespace switches
187 namespace env_vars {
189 extern const char kGoogleUpdateIsMachineEnvVar[];
191 } // namespace env_vars
193 extern const wchar_t kActiveSetupExe[];
194 extern const wchar_t kAppLauncherGuid[];
195 extern const wchar_t kChromeDll[];
196 extern const wchar_t kChromeChildDll[];
197 extern const wchar_t kChromeExe[];
198 extern const wchar_t kChromeFrameDll[];
199 extern const wchar_t kChromeFrameHelperDll[];
200 extern const wchar_t kChromeFrameHelperExe[];
201 extern const wchar_t kChromeFrameHelperWndClass[];
202 extern const wchar_t kChromeLauncherExe[];
203 extern const wchar_t kChromeMetroDll[];
204 extern const wchar_t kChromeNewExe[];
205 extern const wchar_t kChromeOldExe[];
206 extern const wchar_t kCmdOnOsUpgrade[];
207 extern const wchar_t kCmdQuickEnableCf[];
208 extern const wchar_t kDelegateExecuteExe[];
209 extern const wchar_t kEULASentinelFile[];
210 extern const wchar_t kGoogleChromeInstallSubDir1[];
211 extern const wchar_t kGoogleChromeInstallSubDir2[];
212 extern const wchar_t kInstallBinaryDir[];
213 extern const wchar_t kInstallerDir[];
214 extern const wchar_t kInstallTempDir[];
215 extern const wchar_t kLnkExt[];
216 extern const wchar_t kNaClExe[];
217 extern const wchar_t kSetupExe[];
218 extern const wchar_t kSxSSuffix[];
219 extern const wchar_t kUninstallArgumentsField[];
220 extern const wchar_t kUninstallDisplayNameField[];
221 extern const wchar_t kUninstallInstallationDate[];
222 extern const char kUninstallMetricsName[];
223 extern const wchar_t kUninstallStringField[];
225 // Google Update installer result API
226 extern const wchar_t kInstallerError[];
227 extern const wchar_t kInstallerExtraCode1[];
228 extern const wchar_t kInstallerResult[];
229 extern const wchar_t kInstallerResultUIString[];
230 extern const wchar_t kInstallerSuccessLaunchCmdLine[];
232 // Product options.
233 extern const wchar_t kOptionMultiInstall[];
235 // Chrome channel display names.
236 // NOTE: Canary is not strictly a 'channel', but rather a separate product
237 // installed side-by-side. However, GoogleUpdateSettings::GetChromeChannel
238 // will return "canary" for that product.
239 extern const wchar_t kChromeChannelUnknown[];
240 extern const wchar_t kChromeChannelCanary[];
241 extern const wchar_t kChromeChannelDev[];
242 extern const wchar_t kChromeChannelBeta[];
243 extern const wchar_t kChromeChannelStable[];
244 extern const wchar_t kChromeChannelStableExplicit[];
246 extern const size_t kMaxAppModelIdLength;
248 // The range of error values for the installer, Courgette, and bsdiff is
249 // overlapping. These offset values disambiguate between different sets
250 // of errors by shifting the values up with the specified offset.
251 const int kCourgetteErrorOffset = 300;
252 const int kBsdiffErrorOffset = 600;
254 // Arguments to --patch switch
255 extern const char kCourgette[];
256 extern const char kBsdiff[];
258 } // namespace installer
260 #endif // CHROME_INSTALLER_UTIL_UTIL_CONSTANTS_H_