| Avi Drissman | 4a8573c | 2022-09-09 19:35:54 | [diff] [blame] | 1 | // Copyright 2019 The Chromium Authors |
| Sorin Jianu | f4f51699e | 2019-03-27 20:39:03 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| Sorin Jianu | e066c6a | 2020-02-22 00:28:56 | [diff] [blame] | 5 | #ifndef CHROME_UPDATER_CONSTANTS_H_ |
| 6 | #define CHROME_UPDATER_CONSTANTS_H_ |
| Sorin Jianu | f4f51699e | 2019-03-27 20:39:03 | [diff] [blame] | 7 | |
| Noah Rose Ledesma | 8b66a78 | 2025-06-03 16:28:42 | [diff] [blame] | 8 | #include <optional> |
| 9 | |
| Joshua Pawlicki | 459cd85 | 2022-08-04 02:41:41 | [diff] [blame] | 10 | #include "base/time/time.h" |
| Sorin Jianu | 7d61615 | 2020-04-12 00:11:00 | [diff] [blame] | 11 | #include "build/build_config.h" |
| Sorin Jianu | 9d64af67 | 2020-02-05 19:14:34 | [diff] [blame] | 12 | #include "components/update_client/update_client_errors.h" |
| 13 | |
| Sorin Jianu | f4f51699e | 2019-03-27 20:39:03 | [diff] [blame] | 14 | namespace updater { |
| 15 | |
| S. Ganesh | 84f32a4 | 2023-03-10 16:01:53 | [diff] [blame] | 16 | // Key for storing the installer version in the install settings dictionary. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 17 | inline constexpr char kInstallerVersion[] = "installer_version"; |
| S. Ganesh | 84f32a4 | 2023-03-10 16:01:53 | [diff] [blame] | 18 | |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 19 | // The name of the updater program image. |
| 20 | #if BUILDFLAG(IS_WIN) |
| 21 | inline constexpr char kExecutableName[] = "updater.exe"; |
| 22 | #else |
| 23 | inline constexpr char kExecutableName[] = "updater"; |
| 24 | #endif |
| Sorin Jianu | 311235192 | 2022-07-08 22:01:35 | [diff] [blame] | 25 | |
| Xiaoling Bao | 0f020e7 | 2024-09-12 23:18:49 | [diff] [blame] | 26 | // Uninstall switch for the enterprise companion app. |
| Xiaoling Bao | 721938e | 2024-09-13 05:09:24 | [diff] [blame] | 27 | inline constexpr char kUninstallCompanionAppSwitch[] = "uninstall"; |
| Xiaoling Bao | 0f020e7 | 2024-09-12 23:18:49 | [diff] [blame] | 28 | |
| Joshua Pawlicki | 0922f859 | 2021-07-23 15:26:04 | [diff] [blame] | 29 | // A suffix appended to the updater executable name before any file extension. |
| 30 | extern const char kExecutableSuffix[]; |
| 31 | |
| S. Ganesh | d03515a | 2025-12-12 12:28:19 | [diff] [blame] | 32 | // The value of `request.updater` sent to the update server. |
| 33 | // TODO(crbug.com/467929954): change this value to `PRODUCT_FULLNAME_STRING`. |
| 34 | inline constexpr char kProdId[] = "updater"; |
| 35 | |
| Sorin Jianu | 0f9b7f2 | 2020-03-06 15:03:31 | [diff] [blame] | 36 | // "0.0.0.0". Historically, a null version has been used to indicate a |
| 37 | // new install. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 38 | inline constexpr char kNullVersion[] = "0.0.0.0"; |
| Sorin Jianu | 2d0c54a | 2020-02-27 21:35:52 | [diff] [blame] | 39 | |
| Sorin Jianu | f4f51699e | 2019-03-27 20:39:03 | [diff] [blame] | 40 | // Command line switches. |
| 41 | // |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 42 | // If a command line switch is marked as `backward-compatibility`, it |
| 43 | // means the switch name cannot be changed, and the parser must be able to |
| 44 | // handle command line in the DOS style '/<switch> <optional_value>'. This is to |
| 45 | // make sure the new updater understands the hand-off requests from the legacy |
| 46 | // updaters. |
| 47 | |
| S. Ganesh | 7115044 | 2020-02-19 22:00:07 | [diff] [blame] | 48 | // This switch starts the COM server. This switch is invoked by the COM runtime |
| 49 | // when CoCreate is called on one of several CLSIDs that the server supports. |
| 50 | // We expect to use the COM server for the following scenarios: |
| 51 | // * The Server for the UI when installing User applications, and as a fallback |
| 52 | // if the Service fails when installing Machine applications. |
| 53 | // * The On-Demand COM Server when running for User, and as a fallback if the |
| 54 | // Service fails. |
| 55 | // * COM Server for launching processes at Medium Integrity, i.e., de-elevating. |
| 56 | // * The On-Demand COM Server when the client requests read-only interfaces |
| 57 | // (say, Policy queries) at Medium Integrity. |
| 58 | // * A COM broker when running modes such as On-Demand for Machine. A COM broker |
| 59 | // is something that acts as an intermediary, allowing creating one of several |
| 60 | // possible COM objects that can service a particular COM request, ranging |
| 61 | // from Privileged Services that can offer full functionality for a particular |
| 62 | // set of interfaces, to Medium Integrity processes that can offer limited |
| 63 | // (say, read-only) functionality for that same set of interfaces. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 64 | inline constexpr char kServerSwitch[] = "server"; |
| S. Ganesh | e91ea3b8 | 2019-11-22 23:08:38 | [diff] [blame] | 65 | |
| Mila Green | 300efaa | 2020-09-01 19:50:04 | [diff] [blame] | 66 | // This switch specifies the XPC service the server registers to listen to. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 67 | inline constexpr char kServerServiceSwitch[] = "service"; |
| Mila Green | 300efaa | 2020-09-01 19:50:04 | [diff] [blame] | 68 | |
| 69 | // Valid values for the kServerServiceSwitch. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 70 | inline constexpr char kServerUpdateServiceInternalSwitchValue[] = |
| 71 | "update-internal"; |
| 72 | inline constexpr char kServerUpdateServiceSwitchValue[] = "update"; |
| Mila Green | 300efaa | 2020-09-01 19:50:04 | [diff] [blame] | 73 | |
| S. Ganesh | 4e88e4d | 2022-02-07 23:07:33 | [diff] [blame] | 74 | // This switch starts the Windows service. This switch is invoked by the SCM |
| 75 | // either as a part of system startup (`SERVICE_AUTO_START`) or when `CoCreate` |
| 76 | // is called on one of several CLSIDs that the server supports. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 77 | inline constexpr char kWindowsServiceSwitch[] = "windows-service"; |
| S. Ganesh | 4e88e4d | 2022-02-07 23:07:33 | [diff] [blame] | 78 | |
| 79 | // This switch indicates that the Windows service is in the COM server mode. |
| 80 | // This switch is passed to `ServiceMain` by the SCM when CoCreate is called on |
| 81 | // one of several CLSIDs that the server supports. We expect to use the COM |
| 82 | // service for the following scenarios: |
| S. Ganesh | 7115044 | 2020-02-19 22:00:07 | [diff] [blame] | 83 | // * The Server for the UI when installing Machine applications. |
| 84 | // * The On-Demand COM Server for Machine applications. |
| 85 | // * COM Server for launching processes at System Integrity, i.e., an Elevator. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 86 | inline constexpr char kComServiceSwitch[] = "com-service"; |
| S. Ganesh | 7115044 | 2020-02-19 22:00:07 | [diff] [blame] | 87 | |
| Sorin Jianu | f4f51699e | 2019-03-27 20:39:03 | [diff] [blame] | 88 | // Crash the program for testing purposes. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 89 | inline constexpr char kCrashMeSwitch[] = "crash-me"; |
| Sorin Jianu | f4f51699e | 2019-03-27 20:39:03 | [diff] [blame] | 90 | |
| 91 | // Runs as the Crashpad handler. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 92 | inline constexpr char kCrashHandlerSwitch[] = "crash-handler"; |
| Sorin Jianu | f4f51699e | 2019-03-27 20:39:03 | [diff] [blame] | 93 | |
| Mila Green | eaf3df19 | 2020-08-06 20:23:59 | [diff] [blame] | 94 | // Updates the updater. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 95 | inline constexpr char kUpdateSwitch[] = "update"; |
| Mila Green | eaf3df19 | 2020-08-06 20:23:59 | [diff] [blame] | 96 | |
| S. Ganesh | ad4aa54 | 2025-08-26 20:07:36 | [diff] [blame] | 97 | // Updates the apps. |
| 98 | inline constexpr char kUpdateAppsSwitch[] = "update-apps"; |
| 99 | |
| Joshua Pawlicki | 7790b87 | 2025-10-27 22:12:02 | [diff] [blame] | 100 | // Run as a patch worker. |
| 101 | inline constexpr char kPatchWorkerSwitch[] = "patch-worker"; |
| 102 | |
| Joshua Pawlicki | 665306f4 | 2025-08-14 20:19:18 | [diff] [blame] | 103 | // Run as an unzip worker. |
| 104 | inline constexpr char kUnzipWorkerSwitch[] = "unzip-worker"; |
| 105 | |
| Xiaoling Bao | 15bf6f31 | 2024-08-05 22:00:04 | [diff] [blame] | 106 | // Run as a network worker. |
| 107 | inline constexpr char kNetWorkerSwitch[] = "net-worker"; |
| 108 | |
| S. Ganesh | a27812c | 2024-04-15 21:58:00 | [diff] [blame] | 109 | // Installs the updater. Takes an optional argument for the meta installer tag. |
| 110 | // The tag is a string of arguments, separated by a delimiter (in this case, the |
| 111 | // delimiter is `&`). The tag is typically embedded in the program image of the |
| 112 | // metainstaller, but for testing purposes, the tag could be passed directly as |
| 113 | // a command line argument. The tag is currently encoded as an ASCII string. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 114 | inline constexpr char kInstallSwitch[] = "install"; |
| S. Ganesh | a27812c | 2024-04-15 21:58:00 | [diff] [blame] | 115 | |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 116 | inline constexpr char kEulaRequiredSwitch[] = "eularequired"; |
| Sorin Jianu | 38ac5a7 | 2019-06-11 17:29:14 | [diff] [blame] | 117 | |
| S. Ganesh | de6ebb5 | 2024-04-12 18:42:51 | [diff] [blame] | 118 | // Specifies that this is an OEM install in audit mode. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 119 | inline constexpr char kOemSwitch[] = "oem"; |
| S. Ganesh | de6ebb5 | 2024-04-12 18:42:51 | [diff] [blame] | 120 | |
| S. Ganesh | e4b62ffa | 2022-03-18 01:51:48 | [diff] [blame] | 121 | // The --installerdata=file.dat switch is passed to an installer if an |
| 122 | // installdataindex is specified in the tag or if installerdata is passed in via |
| 123 | // --appargs. The corresponding installerdata is written to file.dat with an |
| 124 | // UTF8 encoding as well as a UTF8 BOM. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 125 | inline constexpr char kInstallerDataSwitch[] = "installerdata"; |
| S. Ganesh | e4b62ffa | 2022-03-18 01:51:48 | [diff] [blame] | 126 | |
| Sorin Jianu | 38ac5a7 | 2019-06-11 17:29:14 | [diff] [blame] | 127 | // Uninstalls the updater. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 128 | inline constexpr char kUninstallSwitch[] = "uninstall"; |
| Sorin Jianu | 16e88f37 | 2019-08-16 20:36:29 | [diff] [blame] | 129 | |
| Mila Green | 7c85571f | 2021-02-04 03:11:23 | [diff] [blame] | 130 | // Uninstalls this version of the updater. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 131 | inline constexpr char kUninstallSelfSwitch[] = "uninstall-self"; |
| Mila Green | 7c85571f | 2021-02-04 03:11:23 | [diff] [blame] | 132 | |
| 133 | // Uninstalls the updater if no apps are managed by it. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 134 | inline constexpr char kUninstallIfUnusedSwitch[] = "uninstall-if-unused"; |
| Mila Green | 7c85571f | 2021-02-04 03:11:23 | [diff] [blame] | 135 | |
| Sorin Jianu | dc61b6a | 2020-05-20 00:40:48 | [diff] [blame] | 136 | // Kicks off the update service. This switch is typically used for by a |
| 137 | // scheduled to invoke the updater periodically. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 138 | inline constexpr char kWakeSwitch[] = "wake"; |
| Sorin Jianu | 38ac5a7 | 2019-06-11 17:29:14 | [diff] [blame] | 139 | |
| Joshua Pawlicki | ba27c9d | 2022-11-22 16:36:00 | [diff] [blame] | 140 | // Kicks off the update service for all versions. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 141 | inline constexpr char kWakeAllSwitch[] = "wake-all"; |
| Joshua Pawlicki | ba27c9d | 2022-11-22 16:36:00 | [diff] [blame] | 142 | |
| Mila Green | fa29446 | 2020-04-15 17:29:48 | [diff] [blame] | 143 | // The updater needs to operate in the system context. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 144 | inline constexpr char kSystemSwitch[] = "system"; |
| Mila Green | fa29446 | 2020-04-15 17:29:48 | [diff] [blame] | 145 | |
| Sorin Jianu | f4f51699e | 2019-03-27 20:39:03 | [diff] [blame] | 146 | // Runs in test mode. Currently, it exits right away. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 147 | inline constexpr char kTestSwitch[] = "test"; |
| Sorin Jianu | f4f51699e | 2019-03-27 20:39:03 | [diff] [blame] | 148 | |
| Joshua Pawlicki | 4bfc24f | 2022-02-03 12:22:42 | [diff] [blame] | 149 | // Run in recovery mode. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 150 | inline constexpr char kRecoverSwitch[] = "recover"; |
| Joshua Pawlicki | 4bfc24f | 2022-02-03 12:22:42 | [diff] [blame] | 151 | |
| S. Ganesh | 8ef3ae7 | 2025-05-06 10:29:01 | [diff] [blame] | 152 | // This switch does the following: |
| 153 | // * Force-installs the metainstaller that is run with this switch and makes it |
| 154 | // the active `updater`. |
| 155 | // * Installs the application(s) that are implicitly specified in the tagged |
| 156 | // metainstaller, or explicitly specified using the `--install` or `--handoff` |
| 157 | // parameters. |
| 158 | inline constexpr char kForceInstallSwitch[] = "force-install"; |
| 159 | |
| Joshua Pawlicki | 4bfc24f | 2022-02-03 12:22:42 | [diff] [blame] | 160 | // The version of the program triggering recovery. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 161 | inline constexpr char kBrowserVersionSwitch[] = "browser-version"; |
| Joshua Pawlicki | 4bfc24f | 2022-02-03 12:22:42 | [diff] [blame] | 162 | |
| 163 | // The session ID of the Omaha session triggering recovery. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 164 | inline constexpr char kSessionIdSwitch[] = |
| 165 | "sessionid"; // backward-compatibility. |
| Joshua Pawlicki | 4bfc24f | 2022-02-03 12:22:42 | [diff] [blame] | 166 | |
| 167 | // The app ID of the program triggering recovery. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 168 | inline constexpr char kAppGuidSwitch[] = "appguid"; |
| Joshua Pawlicki | 4bfc24f | 2022-02-03 12:22:42 | [diff] [blame] | 169 | |
| Sorin Jianu | 43802ccd0 | 2024-06-08 00:23:42 | [diff] [blame] | 170 | // Causes crashpad handler to start a second instance to monitor the first |
| Xiaoling Bao | 5b8fe91 | 2024-05-04 01:12:21 | [diff] [blame] | 171 | // instance for exceptions. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 172 | inline constexpr char kMonitorSelfSwitch[] = "monitor-self"; |
| Xiaoling Bao | 5b8fe91 | 2024-05-04 01:12:21 | [diff] [blame] | 173 | |
| Sorin Jianu | 43802ccd0 | 2024-06-08 00:23:42 | [diff] [blame] | 174 | // Additional arguments passed to the --monitor-self instance. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 175 | inline constexpr char kMonitorSelfSwitchArgument[] = "monitor-self-argument"; |
| Sorin Jianu | 43802ccd0 | 2024-06-08 00:23:42 | [diff] [blame] | 176 | |
| Sorin Jianu | 76392dc | 2019-08-13 18:23:08 | [diff] [blame] | 177 | // The handle of an event to signal when the initialization of the main process |
| 178 | // is complete. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 179 | inline constexpr char kInitDoneNotifierSwitch[] = "init-done-notifier"; |
| Sorin Jianu | 76392dc | 2019-08-13 18:23:08 | [diff] [blame] | 180 | |
| Sorin Jianu | 16e88f37 | 2019-08-16 20:36:29 | [diff] [blame] | 181 | // Enables logging. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 182 | inline constexpr char kEnableLoggingSwitch[] = "enable-logging"; |
| Sorin Jianu | 16e88f37 | 2019-08-16 20:36:29 | [diff] [blame] | 183 | |
| Sorin Jianu | d2725369 | 2021-09-30 15:14:39 | [diff] [blame] | 184 | // Specifies the logging module filter and its value. Note that some call sites |
| 185 | // may still use different values for the logging module filter. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 186 | inline constexpr char kLoggingModuleSwitch[] = "vmodule"; |
| 187 | inline constexpr char kLoggingModuleSwitchValue[] = |
| 188 | #if BUILDFLAG(IS_WIN) |
| 189 | "*/components/winhttp/*=1," |
| 190 | #endif |
| Noah Rose Ledesma | 6bc6e49 | 2024-10-02 21:39:56 | [diff] [blame] | 191 | "*/components/update_client/*=2," |
| 192 | "*/chrome/enterprise_companion/*=2," |
| 193 | "*/chrome/updater/*=2"; |
| Sorin Jianu | 16e88f37 | 2019-08-16 20:36:29 | [diff] [blame] | 194 | |
| S. Ganesh | 64aca4f | 2020-03-26 20:24:19 | [diff] [blame] | 195 | // Specifies the application that the Updater needs to install. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 196 | inline constexpr char kAppIdSwitch[] = "app-id"; |
| S. Ganesh | 64aca4f | 2020-03-26 20:24:19 | [diff] [blame] | 197 | |
| Mila Green | 3e3058a | 2020-08-27 16:59:27 | [diff] [blame] | 198 | // Specifies the version of the application that the updater needs to register. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 199 | inline constexpr char kAppVersionSwitch[] = "app-version"; |
| Mila Green | 3e3058a | 2020-08-27 16:59:27 | [diff] [blame] | 200 | |
| S. Ganesh | e6eb714 | 2022-01-24 21:57:20 | [diff] [blame] | 201 | // Specifies that the Updater should perform some minimal checks to verify that |
| 202 | // it is operational/healthy. This is for backward compatibility with Omaha 3. |
| 203 | // Omaha 3 runs "GoogleUpdate.exe /healthcheck" and expects an exit code of |
| 204 | // HRESULT SUCCESS, i.e., S_OK, in which case it will hand off the installation |
| 205 | // to Omaha 4. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 206 | inline constexpr char kHealthCheckSwitch[] = "healthcheck"; |
| S. Ganesh | e6eb714 | 2022-01-24 21:57:20 | [diff] [blame] | 207 | |
| Joshua Pawlicki | 8d55099 | 2022-07-20 19:35:35 | [diff] [blame] | 208 | // Specifies the enterprise request argument. On Windows, the request may |
| 209 | // be from legacy updaters which pass the argument in the format of |
| 210 | // `/enterprise`. Manual argument parsing is needed for that scenario. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 211 | inline constexpr char kEnterpriseSwitch[] = |
| 212 | "enterprise"; // backward-compatibility. |
| Joshua Pawlicki | 8d55099 | 2022-07-20 19:35:35 | [diff] [blame] | 213 | |
| Xiaoling Bao | 8cc74f1 | 2022-09-06 23:30:41 | [diff] [blame] | 214 | // Specifies that no UI should be shown. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 215 | inline constexpr char kSilentSwitch[] = "silent"; // backward-compatibility. |
| Xiaoling Bao | 8cc74f1 | 2022-09-06 23:30:41 | [diff] [blame] | 216 | |
| S. Ganesh | 49727a84 | 2024-01-09 01:01:50 | [diff] [blame] | 217 | // The "alwayslaunchcmd" switch specifies that launch commands are to be run |
| 218 | // unconditionally, even for silent modes. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 219 | inline constexpr char kAlwaysLaunchCmdSwitch[] = "alwayslaunchcmd"; |
| S. Ganesh | 49727a84 | 2024-01-09 01:01:50 | [diff] [blame] | 220 | |
| Xiaoling Bao | 51e2af1 | 2022-01-28 22:02:10 | [diff] [blame] | 221 | // Specifies the handoff request argument. On Windows, the request may |
| 222 | // be from legacy updaters which pass the argument in the format of |
| 223 | // `/handoff <install-args-details>`. Manual argument parsing is needed for that |
| 224 | // scenario. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 225 | inline constexpr char kHandoffSwitch[] = "handoff"; // backward-compatibility. |
| Xiaoling Bao | 51e2af1 | 2022-01-28 22:02:10 | [diff] [blame] | 226 | |
| Xiaoling Bao | a7b48ae0 | 2022-05-04 03:04:06 | [diff] [blame] | 227 | // Specifies the full path to the offline install resources. The folder |
| 228 | // contains offline installer and the manifest file. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 229 | inline constexpr char kOfflineDirSwitch[] = |
| 230 | "offlinedir"; // backward-compatibility. |
| Xiaoling Bao | a7b48ae0 | 2022-05-04 03:04:06 | [diff] [blame] | 231 | |
| Xiaoling Bao | e330b703 | 2022-09-13 23:29:19 | [diff] [blame] | 232 | // Specifies extra app args. The switch must be in the following format: |
| 233 | // --appargs="appguid=<appid>&installerdata=<URL-encoded-installer-data>" |
| 234 | // On Windows, the request may be from legacy updaters which pass the argument |
| 235 | // in the format of `/appargs <value>`. Manual argument parsing is needed for |
| 236 | // that scenario. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 237 | inline constexpr char kAppArgsSwitch[] = "appargs"; // backward-compatibility. |
| Xiaoling Bao | e330b703 | 2022-09-13 23:29:19 | [diff] [blame] | 238 | |
| S. Ganesh | 8fd7ddb | 2022-03-29 19:57:34 | [diff] [blame] | 239 | // The "expect-elevated" switch indicates that updater setup should be running |
| 240 | // elevated (at high integrity). This switch is needed to avoid running into a |
| 241 | // loop trying (but failing repeatedly) to elevate updater setup when attempting |
| 242 | // to install on a standard user account with UAC disabled. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 243 | inline constexpr char kCmdLineExpectElevated[] = "expect-elevated"; |
| S. Ganesh | 8fd7ddb | 2022-03-29 19:57:34 | [diff] [blame] | 244 | |
| S. Ganesh | d1c4b0b7d5 | 2024-08-08 19:46:05 | [diff] [blame] | 245 | // The "expect-de-elevated" switch indicates that updater setup should be |
| 246 | // running de-elevated (at medium integrity). This switch is needed to avoid |
| 247 | // running into a loop trying (but failing repeatedly) to de-elevate updater |
| 248 | // setup when attempting to install as a standard user account with UAC enabled. |
| 249 | inline constexpr char kCmdLineExpectDeElevated[] = "expect-de-elevated"; |
| S. Ganesh | a3420b9 | 2022-10-04 18:24:42 | [diff] [blame] | 250 | |
| S. Ganesh | 15636a9 | 2022-04-09 01:53:08 | [diff] [blame] | 251 | // The "prefers-user" switch indicates that updater setup could not elevate, and |
| 252 | // is now trying to install the app per-user. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 253 | inline constexpr char kCmdLinePrefersUser[] = "prefers-user"; |
| S. Ganesh | 15636a9 | 2022-04-09 01:53:08 | [diff] [blame] | 254 | |
| Sorin Jianu | 6cd7bc5 | 2019-11-05 16:36:45 | [diff] [blame] | 255 | // File system paths. |
| Sorin Jianu | 38ac5a7 | 2019-06-11 17:29:14 | [diff] [blame] | 256 | // |
| 257 | // The directory name where CRX apps get installed. This is provided for demo |
| 258 | // purposes, since products installed by this updater will be installed in |
| 259 | // their specific locations. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 260 | inline constexpr char kAppsDir[] = "apps"; |
| Sorin Jianu | 38ac5a7 | 2019-06-11 17:29:14 | [diff] [blame] | 261 | |
| 262 | // The name of the uninstall script which is invoked by the --uninstall switch. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 263 | inline constexpr char kUninstallScript[] = "uninstall.cmd"; |
| Sorin Jianu | 38ac5a7 | 2019-06-11 17:29:14 | [diff] [blame] | 264 | |
| Joshua Pawlicki | 9b52edeb | 2020-04-21 15:26:08 | [diff] [blame] | 265 | // Developer override keys. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 266 | inline constexpr char kDevOverrideKeyUrl[] = "url"; |
| 267 | inline constexpr char kDevOverrideKeyCrashUploadUrl[] = "crash_upload_url"; |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 268 | inline constexpr char kDevOverrideKeyAppLogoUrl[] = "app_logo_url"; |
| Noah Rose Ledesma | 1281bf84 | 2025-06-05 16:11:49 | [diff] [blame] | 269 | inline constexpr char kDevOverrideKeyEventLoggingUrl[] = "event_logging_url"; |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 270 | inline constexpr char kDevOverrideKeyUseCUP[] = "use_cup"; |
| 271 | inline constexpr char kDevOverrideKeyInitialDelay[] = "initial_delay"; |
| 272 | inline constexpr char kDevOverrideKeyServerKeepAliveSeconds[] = |
| 273 | "server_keep_alive"; |
| 274 | inline constexpr char kDevOverrideKeyCrxVerifierFormat[] = |
| 275 | "crx_verifier_format"; |
| Joshua Pawlicki | 3435a25d5 | 2025-08-06 17:38:56 | [diff] [blame] | 276 | inline constexpr char kDevOverrideKeyCrxPublicKeyHash[] = "crx_public_key_hash"; |
| Noah Rose Ledesma | 6ef240e2 | 2025-05-31 01:00:03 | [diff] [blame] | 277 | inline constexpr char kDevOverrideKeyMinumumEventLoggingCooldownSeconds[] = |
| 278 | "minimum_event_logging_cooldown_seconds"; |
| Noah Rose Ledesma | add6e7a | 2025-06-13 17:19:22 | [diff] [blame] | 279 | inline constexpr char kDevOverrideKeyEventLoggingPermissionProviderAppId[] = |
| 280 | "event_logging_permission_provider_app_id"; |
| 281 | #if BUILDFLAG(IS_MAC) |
| 282 | inline constexpr char |
| 283 | kDevOverrideKeyEventLoggingPermissionProviderDirectoryName[] = |
| 284 | "event_logging_permission_provider_directory_name"; |
| 285 | #endif |
| S. Ganesh | f0d3ab0 | 2025-01-18 04:02:42 | [diff] [blame] | 286 | inline constexpr char kDevOverrideKeyDictPolicies[] = "dict_policies"; |
| 287 | |
| 288 | // TODO(crbug.com/389965546): remove this once the checked-in old updater builds |
| 289 | // recognize "dict_policies". |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 290 | inline constexpr char kDevOverrideKeyGroupPolicies[] = "group_policies"; |
| S. Ganesh | f0d3ab0 | 2025-01-18 04:02:42 | [diff] [blame] | 291 | |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 292 | inline constexpr char kDevOverrideKeyOverinstallTimeout[] = |
| 293 | "overinstall_timeout"; |
| 294 | inline constexpr char kDevOverrideKeyIdleCheckPeriodSeconds[] = |
| 295 | "idle_check_period"; |
| 296 | inline constexpr char kDevOverrideKeyManagedDevice[] = "managed_device"; |
| 297 | inline constexpr char kDevOverrideKeyEnableDiffUpdates[] = |
| 298 | "enable_diff_updates"; |
| Xiaoling Bao | 760b128a | 2024-10-02 23:17:15 | [diff] [blame] | 299 | inline constexpr char kDevOverrideKeyCecaConnectionTimeout[] = |
| 300 | "ceca_connection_timeout"; |
| Joshua Pawlicki | 9b52edeb | 2020-04-21 15:26:08 | [diff] [blame] | 301 | |
| Sorin Jianu | 9d64af67 | 2020-02-05 19:14:34 | [diff] [blame] | 302 | // Timing constants. |
| Joshua Pawlicki | 459cd85 | 2022-08-04 02:41:41 | [diff] [blame] | 303 | // How long to wait for an application installer (such as chrome_installer.exe) |
| 304 | // to complete. |
| S. Ganesh | 2707fe5 | 2022-10-06 21:33:45 | [diff] [blame] | 305 | inline constexpr base::TimeDelta kWaitForAppInstaller = base::Minutes(15); |
| Sorin Jianu | 9d64af67 | 2020-02-05 19:14:34 | [diff] [blame] | 306 | |
| S. Ganesh | 89976084 | 2023-03-08 17:29:43 | [diff] [blame] | 307 | // How long to wait for the common setup lock for |
| 308 | // AppInstall/AppUninstall/AppUpdate. |
| 309 | inline constexpr base::TimeDelta kWaitForSetupLock = base::Seconds(5); |
| 310 | |
| S. Ganesh | 6cd1f26 | 2022-08-15 18:30:29 | [diff] [blame] | 311 | // The default last check period is 4.5 hours. |
| S. Ganesh | 2707fe5 | 2022-10-06 21:33:45 | [diff] [blame] | 312 | inline constexpr base::TimeDelta kDefaultLastCheckPeriod = |
| S. Ganesh | 6cd1f26 | 2022-08-15 18:30:29 | [diff] [blame] | 313 | base::Hours(4) + base::Minutes(30); |
| 314 | |
| S. Ganesh | 28fad77 | 2025-04-17 22:03:37 | [diff] [blame] | 315 | #if BUILDFLAG(IS_MAC) |
| Joshua Pawlicki | 52c8363 | 2020-12-15 16:18:15 | [diff] [blame] | 316 | // How long to wait for launchd changes to be reported by launchctl. |
| S. Ganesh | 2707fe5 | 2022-10-06 21:33:45 | [diff] [blame] | 317 | inline constexpr int kWaitForLaunchctlUpdateSec = 5; |
| Xiaohan Wang | 822cc38 | 2022-01-15 19:33:51 | [diff] [blame] | 318 | #endif // BUILDFLAG(IS_MAC) |
| Sorin Jianu | 346e9e4 | 2020-06-02 20:44:52 | [diff] [blame] | 319 | |
| Noah Rose Ledesma | 6ef240e2 | 2025-05-31 01:00:03 | [diff] [blame] | 320 | // The minimum period between remote event logging transmissions. The server may |
| 321 | // instruct the client to backoff for a longer period. |
| 322 | inline constexpr base::TimeDelta kMinimumEventLoggingCooldown = |
| 323 | base::Minutes(15); |
| 324 | |
| tomerni-island | 72d3dc9 | 2025-06-11 08:19:55 | [diff] [blame] | 325 | // The minimum factor by which kDefaultLastCheckPeriod can be |
| 326 | // multiplied to get the next check delay. |
| 327 | inline constexpr double kUpdateCheckMinDelayFactor = 1.0; |
| 328 | |
| 329 | // The maximum factor by which kDefaultLastCheckPeriod can be |
| 330 | // multiplied to get the next check delay. |
| 331 | inline constexpr double kUpdateCheckMaxDelayFactor = 1.2; |
| 332 | |
| 333 | // Probability of applying kUpdateCheckMaxDelayFactor to the next |
| 334 | // check delay. |
| 335 | inline constexpr double kProbabilityOfIncreasedDelay = 0.1; |
| 336 | |
| Joshua Pawlicki | cc3949fb | 2020-06-25 21:04:10 | [diff] [blame] | 337 | // Install Errors. |
| Sorin Jianu | 925cf98 | 2019-05-28 23:50:40 | [diff] [blame] | 338 | // |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 339 | // Specific errors for the updater that are passed through `update_client` are |
| 340 | // reported in such a way that their range does not conflict with the range of |
| 341 | // generic errors defined by the metainstaller, the `update_client` module, or |
| 342 | // Windows. |
| 343 | #if BUILDFLAG(IS_WIN) |
| 344 | inline constexpr int kCustomInstallErrorBase = |
| 345 | static_cast<int>(update_client::InstallError::CUSTOM_ERROR_BASE) + 74000; |
| 346 | #else |
| S. Ganesh | 2707fe5 | 2022-10-06 21:33:45 | [diff] [blame] | 347 | inline constexpr int kCustomInstallErrorBase = |
| Sorin Jianu | 9d64af67 | 2020-02-05 19:14:34 | [diff] [blame] | 348 | static_cast<int>(update_client::InstallError::CUSTOM_ERROR_BASE); |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 349 | #endif |
| Sorin Jianu | 9d64af67 | 2020-02-05 19:14:34 | [diff] [blame] | 350 | |
| S. Ganesh | e500122 | 2023-11-03 22:32:02 | [diff] [blame] | 351 | // Running the application installer failed. |
| 352 | inline constexpr int kErrorApplicationInstallerFailed = |
| 353 | kCustomInstallErrorBase + 3; |
| 354 | |
| 355 | // The errors below are reported in the `extra_code1` in the |
| 356 | // `CrxInstaller::Result` structure, with the `error` reported as |
| 357 | // `GOOPDATEINSTALL_E_FILENAME_INVALID`. `GOOPDATEINSTALL_E_FILENAME_INVALID` is |
| 358 | // used to avoid overlaps of the specific error codes below with Windows error |
| 359 | // codes. |
| 360 | |
| Sorin Jianu | 9d64af67 | 2020-02-05 19:14:34 | [diff] [blame] | 361 | // The install params are missing. This usually means that the update |
| 362 | // response does not include the name of the installer and its command line |
| 363 | // arguments. |
| S. Ganesh | 2707fe5 | 2022-10-06 21:33:45 | [diff] [blame] | 364 | inline constexpr int kErrorMissingInstallParams = kCustomInstallErrorBase + 1; |
| Sorin Jianu | 9d64af67 | 2020-02-05 19:14:34 | [diff] [blame] | 365 | |
| S. Ganesh | e500122 | 2023-11-03 22:32:02 | [diff] [blame] | 366 | // The file extension for the installer is not supported. For instance, on |
| 367 | // Windows, only `.exe` and `.msi` extensions are supported. |
| 368 | inline constexpr int kErrorInvalidFileExtension = kCustomInstallErrorBase + 4; |
| Sorin Jianu | 925cf98 | 2019-05-28 23:50:40 | [diff] [blame] | 369 | |
| S. Ganesh | 7fa0e9d | 2024-03-08 21:25:00 | [diff] [blame] | 370 | // The app command failed to launch. This code is reported in the `extra_code1` |
| 371 | // in the ping, along with the actual error code that caused that launch failure |
| 372 | // in `error`. |
| 373 | inline constexpr int kErrorAppCommandLaunchFailed = kCustomInstallErrorBase + 5; |
| 374 | |
| 375 | // The app command timed out. This code is reported in the `extra_code1` in the |
| 376 | // ping, along with the error code `HRESULT_FROM_WIN32(ERROR_TIMEOUT)` in |
| 377 | // `error`. |
| 378 | inline constexpr int kErrorAppCommandTimedOut = kCustomInstallErrorBase + 6; |
| 379 | |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 380 | // Specific error codes for the updater are reported in such a way that their |
| 381 | // range does not conflict with the range of generic errors defined by the |
| 382 | // metainstaller, the `update_client` module, or Windows. |
| 383 | #if BUILDFLAG(IS_WIN) |
| 384 | inline constexpr int kUpdaterErrorBase = 75000; |
| 385 | #else |
| 386 | inline constexpr int kUpdaterErrorBase = 0; |
| 387 | #endif |
| 388 | |
| Joshua Pawlicki | ac9b05a | 2022-02-17 02:18:45 | [diff] [blame] | 389 | // Error codes. |
| Joshua Pawlicki | cc3949fb | 2020-06-25 21:04:10 | [diff] [blame] | 390 | // |
| 391 | // The server process may exit with any of these exit codes. |
| S. Ganesh | 2707fe5 | 2022-10-06 21:33:45 | [diff] [blame] | 392 | inline constexpr int kErrorOk = 0; |
| Joshua Pawlicki | 30b54bc | 2020-09-01 20:04:24 | [diff] [blame] | 393 | |
| 394 | // The server could not acquire the lock needed to run. |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 395 | inline constexpr int kErrorFailedToLockPrefsMutex = kUpdaterErrorBase + 1; |
| Joshua Pawlicki | 30b54bc | 2020-09-01 20:04:24 | [diff] [blame] | 396 | |
| 397 | // The server candidate failed to promote itself to active. |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 398 | inline constexpr int kErrorFailedToSwap = kUpdaterErrorBase + 2; |
| Joshua Pawlicki | cc3949fb | 2020-06-25 21:04:10 | [diff] [blame] | 399 | |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 400 | inline constexpr int kErrorRegistrationFailed = kUpdaterErrorBase + 3; |
| 401 | inline constexpr int kErrorPermissionDenied = kUpdaterErrorBase + 4; |
| 402 | inline constexpr int kErrorWaitFailedUninstall = kUpdaterErrorBase + 5; |
| 403 | inline constexpr int kErrorWaitFailedInstall = kUpdaterErrorBase + 6; |
| 404 | inline constexpr int kErrorPathServiceFailed = kUpdaterErrorBase + 7; |
| 405 | inline constexpr int kErrorComInitializationFailed = kUpdaterErrorBase + 8; |
| 406 | inline constexpr int kErrorUnknownCommandLine = kUpdaterErrorBase + 9; |
| 407 | inline constexpr int kErrorNoVersionedDirectory = kUpdaterErrorBase + 11; |
| 408 | inline constexpr int kErrorNoBaseDirectory = kUpdaterErrorBase + 12; |
| 409 | inline constexpr int kErrorPathTooLong = kUpdaterErrorBase + 13; |
| 410 | inline constexpr int kErrorProcessLaunchFailed = kUpdaterErrorBase + 14; |
| Joshua Pawlicki | 9c55cb3 | 2022-01-18 22:48:18 | [diff] [blame] | 411 | |
| Joshua Pawlicki | ac9b05a | 2022-02-17 02:18:45 | [diff] [blame] | 412 | // Failed to copy the updater's bundle. |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 413 | inline constexpr int kErrorFailedToCopyBundle = kUpdaterErrorBase + 15; |
| Joshua Pawlicki | ac9b05a | 2022-02-17 02:18:45 | [diff] [blame] | 414 | |
| 415 | // Failed to delete the updater's install folder. |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 416 | inline constexpr int kErrorFailedToDeleteFolder = kUpdaterErrorBase + 16; |
| Joshua Pawlicki | ac9b05a | 2022-02-17 02:18:45 | [diff] [blame] | 417 | |
| 418 | // Failed to delete the updater's data folder. |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 419 | inline constexpr int kErrorFailedToDeleteDataFolder = kUpdaterErrorBase + 17; |
| Joshua Pawlicki | ac9b05a | 2022-02-17 02:18:45 | [diff] [blame] | 420 | |
| 421 | // Failed to get versioned updater folder path. |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 422 | inline constexpr int kErrorFailedToGetVersionedInstallDirectory = |
| 423 | kUpdaterErrorBase + 18; |
| Joshua Pawlicki | ac9b05a | 2022-02-17 02:18:45 | [diff] [blame] | 424 | |
| Joshua Pawlicki | 40f9f96 | 2023-03-03 18:52:49 | [diff] [blame] | 425 | // Failed to get the install directory. |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 426 | inline constexpr int kErrorFailedToGetInstallDir = kUpdaterErrorBase + 19; |
| Joshua Pawlicki | ac9b05a | 2022-02-17 02:18:45 | [diff] [blame] | 427 | |
| 428 | // Failed to remove the active(unversioned) update service job from Launchd. |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 429 | inline constexpr int kErrorFailedToRemoveActiveUpdateServiceJobFromLaunchd = |
| 430 | kUpdaterErrorBase + 20; |
| Joshua Pawlicki | ac9b05a | 2022-02-17 02:18:45 | [diff] [blame] | 431 | |
| 432 | // Failed to remove versioned update service job from Launchd. |
| S. Ganesh | 2707fe5 | 2022-10-06 21:33:45 | [diff] [blame] | 433 | inline constexpr int kErrorFailedToRemoveCandidateUpdateServiceJobFromLaunchd = |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 434 | kUpdaterErrorBase + 21; |
| Joshua Pawlicki | ac9b05a | 2022-02-17 02:18:45 | [diff] [blame] | 435 | |
| 436 | // Failed to remove versioned update service internal job from Launchd. |
| S. Ganesh | 2707fe5 | 2022-10-06 21:33:45 | [diff] [blame] | 437 | inline constexpr int kErrorFailedToRemoveUpdateServiceInternalJobFromLaunchd = |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 438 | kUpdaterErrorBase + 22; |
| Joshua Pawlicki | ac9b05a | 2022-02-17 02:18:45 | [diff] [blame] | 439 | |
| 440 | // Failed to remove versioned wake job from Launchd. |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 441 | inline constexpr int kErrorFailedToRemoveWakeJobFromLaunchd = |
| 442 | kUpdaterErrorBase + 23; |
| Joshua Pawlicki | ac9b05a | 2022-02-17 02:18:45 | [diff] [blame] | 443 | |
| 444 | // Failed to create the active(unversioned) update service Launchd plist. |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 445 | inline constexpr int kErrorFailedToCreateUpdateServiceLaunchdJobPlist = |
| 446 | kUpdaterErrorBase + 24; |
| Joshua Pawlicki | ac9b05a | 2022-02-17 02:18:45 | [diff] [blame] | 447 | |
| 448 | // Failed to create the versioned update service Launchd plist. |
| S. Ganesh | 2707fe5 | 2022-10-06 21:33:45 | [diff] [blame] | 449 | inline constexpr int kErrorFailedToCreateVersionedUpdateServiceLaunchdJobPlist = |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 450 | kUpdaterErrorBase + 25; |
| Joshua Pawlicki | ac9b05a | 2022-02-17 02:18:45 | [diff] [blame] | 451 | |
| 452 | // Failed to create the versioned update service internal Launchd plist. |
| S. Ganesh | 2707fe5 | 2022-10-06 21:33:45 | [diff] [blame] | 453 | inline constexpr int kErrorFailedToCreateUpdateServiceInternalLaunchdJobPlist = |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 454 | kUpdaterErrorBase + 26; |
| Joshua Pawlicki | ac9b05a | 2022-02-17 02:18:45 | [diff] [blame] | 455 | |
| 456 | // Failed to create the versioned wake Launchd plist. |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 457 | inline constexpr int kErrorFailedToCreateWakeLaunchdJobPlist = |
| 458 | kUpdaterErrorBase + 27; |
| Joshua Pawlicki | ac9b05a | 2022-02-17 02:18:45 | [diff] [blame] | 459 | |
| 460 | // Failed to start the active(unversioned) update service job. |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 461 | inline constexpr int kErrorFailedToStartLaunchdActiveServiceJob = |
| 462 | kUpdaterErrorBase + 28; |
| Joshua Pawlicki | ac9b05a | 2022-02-17 02:18:45 | [diff] [blame] | 463 | |
| 464 | // Failed to start the versioned update service job. |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 465 | inline constexpr int kErrorFailedToStartLaunchdVersionedServiceJob = |
| 466 | kUpdaterErrorBase + 29; |
| Joshua Pawlicki | ac9b05a | 2022-02-17 02:18:45 | [diff] [blame] | 467 | |
| 468 | // Failed to start the update service internal job. |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 469 | inline constexpr int kErrorFailedToStartLaunchdUpdateServiceInternalJob = |
| 470 | kUpdaterErrorBase + 30; |
| Joshua Pawlicki | ac9b05a | 2022-02-17 02:18:45 | [diff] [blame] | 471 | |
| 472 | // Failed to start the wake job. |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 473 | inline constexpr int kErrorFailedToStartLaunchdWakeJob = kUpdaterErrorBase + 31; |
| Joshua Pawlicki | ac9b05a | 2022-02-17 02:18:45 | [diff] [blame] | 474 | |
| 475 | // Timed out while awaiting launchctl to become aware of the update service |
| 476 | // internal job. |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 477 | inline constexpr int kErrorFailedAwaitingLaunchdUpdateServiceInternalJob = |
| 478 | kUpdaterErrorBase + 32; |
| Joshua Pawlicki | 4bfc24f | 2022-02-03 12:22:42 | [diff] [blame] | 479 | |
| S. Ganesh | f85b7f63 | 2022-09-02 18:07:15 | [diff] [blame] | 480 | // DM registration failure with mandatory enrollment. |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 481 | inline constexpr int kErrorDMRegistrationFailed = kUpdaterErrorBase + 33; |
| S. Ganesh | f85b7f63 | 2022-09-02 18:07:15 | [diff] [blame] | 482 | |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 483 | inline constexpr int kErrorFailedToInstallLegacyUpdater = |
| 484 | kUpdaterErrorBase + 34; |
| Xiaoling Bao | 0f6c3c0c | 2022-10-03 23:55:36 | [diff] [blame] | 485 | |
| Noah Rose Ledesma | 19f8a79ca | 2022-11-01 18:19:46 | [diff] [blame] | 486 | // A Mojo remote was unexpectedly disconnected. |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 487 | inline constexpr int kErrorIpcDisconnect = kUpdaterErrorBase + 35; |
| Noah Rose Ledesma | 19f8a79ca | 2022-11-01 18:19:46 | [diff] [blame] | 488 | |
| Noah Rose Ledesma | 3fcbdad | 2022-11-15 18:47:26 | [diff] [blame] | 489 | // Failed to copy the updater binary. |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 490 | inline constexpr int kErrorFailedToCopyBinary = kUpdaterErrorBase + 36; |
| Noah Rose Ledesma | 3fcbdad | 2022-11-15 18:47:26 | [diff] [blame] | 491 | |
| Joshua Pawlicki | 221f668 | 2023-05-25 19:23:54 | [diff] [blame] | 492 | // Failed to delete a socket file. |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 493 | inline constexpr int kErrorFailedToDeleteSocket = kUpdaterErrorBase + 37; |
| Noah Rose Ledesma | 3fcbdad | 2022-11-15 18:47:26 | [diff] [blame] | 494 | |
| Joshua Pawlicki | 221f668 | 2023-05-25 19:23:54 | [diff] [blame] | 495 | // Failed to create a symlink to the current version. |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 496 | inline constexpr int kErrorFailedToLinkCurrent = kUpdaterErrorBase + 38; |
| Joshua Pawlicki | 16df3a8 | 2022-12-15 18:04:19 | [diff] [blame] | 497 | |
| Joshua Pawlicki | 221f668 | 2023-05-25 19:23:54 | [diff] [blame] | 498 | // Failed to rename the current symlink during activation. |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 499 | inline constexpr int kErrorFailedToRenameCurrent = kUpdaterErrorBase + 39; |
| Joshua Pawlicki | 16df3a8 | 2022-12-15 18:04:19 | [diff] [blame] | 500 | |
| Noah Rose Ledesma | 59a4c5d4 | 2023-01-11 22:11:34 | [diff] [blame] | 501 | // Failed to install one or more Systemd units. |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 502 | inline constexpr int kErrorFailedToInstallSystemdUnit = kUpdaterErrorBase + 40; |
| Noah Rose Ledesma | 59a4c5d4 | 2023-01-11 22:11:34 | [diff] [blame] | 503 | |
| 504 | // Failed to remove one or more Systemd units during uninstallation. |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 505 | inline constexpr int kErrorFailedToRemoveSystemdUnit = kUpdaterErrorBase + 41; |
| Noah Rose Ledesma | 59a4c5d4 | 2023-01-11 22:11:34 | [diff] [blame] | 506 | |
| Joshua Pawlicki | 1dbc007 | 2023-03-01 22:36:31 | [diff] [blame] | 507 | // Running as the wrong user for the provided UpdaterScope. |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 508 | inline constexpr int kErrorWrongUser = kUpdaterErrorBase + 42; |
| Joshua Pawlicki | 1dbc007 | 2023-03-01 22:36:31 | [diff] [blame] | 509 | |
| Baitinq | 0aff85e | 2023-04-20 19:49:37 | [diff] [blame] | 510 | // Failed to get the setup files. |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 511 | inline constexpr int kErrorFailedToGetSetupFiles = kUpdaterErrorBase + 43; |
| Baitinq | 0aff85e | 2023-04-20 19:49:37 | [diff] [blame] | 512 | |
| 513 | // Failed to run install list. |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 514 | inline constexpr int kErrorFailedToRunInstallList = kUpdaterErrorBase + 44; |
| Baitinq | 0aff85e | 2023-04-20 19:49:37 | [diff] [blame] | 515 | |
| Joshua Pawlicki | e581259 | 2023-06-12 17:24:54 | [diff] [blame] | 516 | // The server was running but had no tasks to do. |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 517 | inline constexpr int kErrorIdle = kUpdaterErrorBase + 45; |
| Joshua Pawlicki | e581259 | 2023-06-12 17:24:54 | [diff] [blame] | 518 | |
| Joshua Pawlicki | 85369dc | 2024-02-29 17:40:03 | [diff] [blame] | 519 | // The call was rejected because the user needs to accept the EULA / Terms of |
| 520 | // service. |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 521 | inline constexpr int kErrorEulaRequired = kUpdaterErrorBase + 46; |
| Joshua Pawlicki | 85369dc | 2024-02-29 17:40:03 | [diff] [blame] | 522 | |
| Joshua Pawlicki | 107feb8 | 2024-05-07 15:57:15 | [diff] [blame] | 523 | // The current operating system is not supported. |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 524 | inline constexpr int kErrorUnsupportedOperatingSystem = kUpdaterErrorBase + 47; |
| Joshua Pawlicki | 107feb8 | 2024-05-07 15:57:15 | [diff] [blame] | 525 | |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 526 | inline constexpr int kErrorTagParsing = kUpdaterErrorBase + 50; |
| Sorin Jianu | 3bc96ba | 2022-02-18 20:38:34 | [diff] [blame] | 527 | |
| Joshua Pawlicki | dc8ee141 | 2022-03-10 21:07:37 | [diff] [blame] | 528 | // Metainstaller errors. |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 529 | inline constexpr int kErrorCreatingTempDir = kUpdaterErrorBase + 60; |
| 530 | inline constexpr int kErrorUnpackingResource = kUpdaterErrorBase + 61; |
| 531 | inline constexpr int kErrorInitializingBackupDir = kUpdaterErrorBase + 62; |
| Joshua Pawlicki | dc8ee141 | 2022-03-10 21:07:37 | [diff] [blame] | 532 | |
| Joshua Pawlicki | 16df3a8 | 2022-12-15 18:04:19 | [diff] [blame] | 533 | // Launcher errors. |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 534 | inline constexpr int kErrorGettingUpdaterPath = kUpdaterErrorBase + 71; |
| 535 | inline constexpr int kErrorStattingPath = kUpdaterErrorBase + 72; |
| 536 | inline constexpr int kErrorLaunchingProcess = kUpdaterErrorBase + 73; |
| 537 | inline constexpr int kErrorPathOwnershipMismatch = kUpdaterErrorBase + 74; |
| Joshua Pawlicki | 16df3a8 | 2022-12-15 18:04:19 | [diff] [blame] | 538 | |
| S. Ganesh | 89976084 | 2023-03-08 17:29:43 | [diff] [blame] | 539 | // A setup process could not acquire the lock needed to run. |
| S. Ganesh | dba3f73 | 2024-07-13 00:40:17 | [diff] [blame] | 540 | inline constexpr int kErrorFailedToLockSetupMutex = kUpdaterErrorBase + 75; |
| S. Ganesh | 89976084 | 2023-03-08 17:29:43 | [diff] [blame] | 541 | |
| Xiaoling Bao | 15bf6f31 | 2024-08-05 22:00:04 | [diff] [blame] | 542 | // Cannot establish a Mojo connection. |
| 543 | inline constexpr int kErrorMojoConnectionFailure = kUpdaterErrorBase + 76; |
| 544 | |
| 545 | // Mojo server rejected the request. |
| 546 | inline constexpr int kErrorMojoRequestRejected = kUpdaterErrorBase + 77; |
| 547 | |
| Xiaoling Bao | 0ddb5f6 | 2024-08-05 23:46:36 | [diff] [blame] | 548 | // Cannot find the console user, for example when the user is not logged on. |
| 549 | inline constexpr int kErrorNoConsoleUser = kUpdaterErrorBase + 78; |
| 550 | |
| Xiaoling Bao | 2af464ec | 2024-08-27 01:29:26 | [diff] [blame] | 551 | // Failed to fetch enterprise policies. |
| 552 | inline constexpr int kErrorPolicyFetchFailed = kUpdaterErrorBase + 79; |
| 553 | |
| Xiaoling Bao | 0f020e7 | 2024-09-12 23:18:49 | [diff] [blame] | 554 | // Failed to uninstall the enterprise companion app. |
| 555 | inline constexpr int kErrorFailedToUninstallCompanionApp = |
| 556 | kUpdaterErrorBase + 80; |
| 557 | |
| 558 | // Failed to uninstall the other versions of updater. |
| 559 | inline constexpr int kErrorFailedToUninstallOtherVersion = |
| 560 | kUpdaterErrorBase + 81; |
| 561 | |
| S. Ganesh | 1f0fc1a3 | 2025-01-06 22:24:50 | [diff] [blame] | 562 | // No observer completion info for the install. |
| 563 | inline constexpr int kErrorNoObserverCompletionInfo = kUpdaterErrorBase + 82; |
| 564 | |
| 565 | // No apps to install. |
| 566 | inline constexpr int kErrorNoApps = kUpdaterErrorBase + 83; |
| 567 | |
| Joshua Pawlicki | d353caa1 | 2025-11-04 18:05:06 | [diff] [blame] | 568 | // A path references the parent directory. |
| 569 | inline constexpr int kErrorPathReferencesParent = kUpdaterErrorBase + 84; |
| 570 | |
| S. Ganesh | a61c38f | 2020-04-16 15:44:41 | [diff] [blame] | 571 | // Policy Management constants. |
| Xiaoling Bao | f3dd5a2a | 2021-03-13 00:02:51 | [diff] [blame] | 572 | // The maximum value allowed for policy AutoUpdateCheckPeriodMinutes. |
| S. Ganesh | 2707fe5 | 2022-10-06 21:33:45 | [diff] [blame] | 573 | inline constexpr int kMaxAutoUpdateCheckPeriodMinutes = 43200; |
| Xiaoling Bao | f3dd5a2a | 2021-03-13 00:02:51 | [diff] [blame] | 574 | |
| 575 | // The maximum value allowed for policy UpdatesSuppressedDurationMin. |
| S. Ganesh | 2707fe5 | 2022-10-06 21:33:45 | [diff] [blame] | 576 | inline constexpr int kMaxUpdatesSuppressedDurationMinutes = 960; |
| Xiaoling Bao | f3dd5a2a | 2021-03-13 00:02:51 | [diff] [blame] | 577 | |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 578 | inline constexpr char kProxyModeDirect[] = "direct"; |
| 579 | inline constexpr char kProxyModeAutoDetect[] = "auto_detect"; |
| 580 | inline constexpr char kProxyModePacScript[] = "pac_script"; |
| 581 | inline constexpr char kProxyModeFixedServers[] = "fixed_servers"; |
| 582 | inline constexpr char kProxyModeSystem[] = "system"; |
| S. Ganesh | a61c38f | 2020-04-16 15:44:41 | [diff] [blame] | 583 | |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 584 | inline constexpr char kDownloadPreferenceCacheable[] = "cacheable"; |
| S. Ganesh | 5da1639 | 2020-04-24 22:49:46 | [diff] [blame] | 585 | |
| S. Ganesh | e4b62ffa | 2022-03-18 01:51:48 | [diff] [blame] | 586 | // UTF8 byte order mark (BOM) used to prefix the contents of the installerdata |
| 587 | // file. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 588 | inline constexpr char kUTF8BOM[] = "\xEF\xBB\xBF"; |
| S. Ganesh | e4b62ffa | 2022-03-18 01:51:48 | [diff] [blame] | 589 | |
| S. Ganesh | 2707fe5 | 2022-10-06 21:33:45 | [diff] [blame] | 590 | inline constexpr int kPolicyNotSet = -1; |
| 591 | inline constexpr int kPolicyDisabled = 0; |
| 592 | inline constexpr int kPolicyEnabled = 1; |
| 593 | inline constexpr int kPolicyEnabledMachineOnly = 4; |
| 594 | inline constexpr int kPolicyManualUpdatesOnly = 2; |
| 595 | inline constexpr int kPolicyAutomaticUpdatesOnly = 3; |
| 596 | inline constexpr int kPolicyForceInstallMachine = 5; |
| 597 | inline constexpr int kPolicyForceInstallUser = 6; |
| S. Ganesh | a61c38f | 2020-04-16 15:44:41 | [diff] [blame] | 598 | |
| S. Ganesh | 2707fe5 | 2022-10-06 21:33:45 | [diff] [blame] | 599 | inline constexpr bool kInstallPolicyDefault = kPolicyEnabled; |
| 600 | inline constexpr bool kUpdatePolicyDefault = kPolicyEnabled; |
| S. Ganesh | a61c38f | 2020-04-16 15:44:41 | [diff] [blame] | 601 | |
| S. Ganesh | 62e77e5 | 2025-01-17 21:49:52 | [diff] [blame] | 602 | // Policy manager constants. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 603 | inline constexpr char kSourceDMPolicyManager[] = "Device Management"; |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 604 | inline constexpr char kSourceDefaultValuesPolicyManager[] = "Default"; |
| 605 | inline constexpr char kSourceDictValuesPolicyManager[] = "DictValuePolicy"; |
| Xiaoling Bao | 716555d | 2025-01-15 20:30:35 | [diff] [blame] | 606 | #if BUILDFLAG(IS_WIN) |
| S. Ganesh | 62e77e5 | 2025-01-17 21:49:52 | [diff] [blame] | 607 | inline constexpr bool kPlatformPolicyManagerDefined = true; |
| Xiaoling Bao | 716555d | 2025-01-15 20:30:35 | [diff] [blame] | 608 | inline constexpr char kSourcePlatformPolicyManager[] = "Group Policy"; |
| S. Ganesh | 62e77e5 | 2025-01-17 21:49:52 | [diff] [blame] | 609 | |
| 610 | // On Windows, by default, Group Policy has a higher priority than the |
| 611 | // clould policy. |
| 612 | inline constexpr bool kCloudPolicyOverridesPlatformPolicyDefaultValue = false; |
| Xiaoling Bao | 716555d | 2025-01-15 20:30:35 | [diff] [blame] | 613 | #elif BUILDFLAG(IS_MAC) |
| S. Ganesh | 62e77e5 | 2025-01-17 21:49:52 | [diff] [blame] | 614 | inline constexpr bool kPlatformPolicyManagerDefined = true; |
| Xiaoling Bao | 716555d | 2025-01-15 20:30:35 | [diff] [blame] | 615 | inline constexpr char kSourcePlatformPolicyManager[] = "Managed Preferences"; |
| S. Ganesh | 62e77e5 | 2025-01-17 21:49:52 | [diff] [blame] | 616 | |
| 617 | // On macOS, cloud policy has a higher priority than the Managed Preferences. |
| 618 | inline constexpr bool kCloudPolicyOverridesPlatformPolicyDefaultValue = true; |
| Xiaoling Bao | 716555d | 2025-01-15 20:30:35 | [diff] [blame] | 619 | #else |
| S. Ganesh | 62e77e5 | 2025-01-17 21:49:52 | [diff] [blame] | 620 | inline constexpr bool kPlatformPolicyManagerDefined = false; |
| Xiaoling Bao | 716555d | 2025-01-15 20:30:35 | [diff] [blame] | 621 | inline constexpr char kSourcePlatformPolicyManager[] = "not-defined"; |
| S. Ganesh | 62e77e5 | 2025-01-17 21:49:52 | [diff] [blame] | 622 | |
| 623 | // On other platforms, there's no platform policy at the moment, the value |
| 624 | // doesn't actually matter. |
| 625 | inline constexpr bool kCloudPolicyOverridesPlatformPolicyDefaultValue = true; |
| Xiaoling Bao | 716555d | 2025-01-15 20:30:35 | [diff] [blame] | 626 | #endif |
| S. Ganesh | d76f8a5 | 2023-01-20 02:27:50 | [diff] [blame] | 627 | |
| Noah Rose Ledesma | 9f16ddf | 2025-11-07 21:14:45 | [diff] [blame] | 628 | enum class UninstallPingReason { |
| 629 | kUninstalled = 0, |
| 630 | kUserNotAnOwner = 1, |
| 631 | kNoAppsRemain = 2, |
| 632 | kNeverHadApps = 3, |
| 633 | }; |
| Sorin Jianu | 9f9f5c9e | 2020-11-15 05:31:15 | [diff] [blame] | 634 | |
| Mila Green | 1313bb8 | 2020-12-12 00:57:36 | [diff] [blame] | 635 | // The file downloaded to a temporary location could not be moved. |
| S. Ganesh | 2707fe5 | 2022-10-06 21:33:45 | [diff] [blame] | 636 | inline constexpr int kErrorFailedToMoveDownloadedFile = 5; |
| Mila Green | 1313bb8 | 2020-12-12 00:57:36 | [diff] [blame] | 637 | |
| Xiaoling Bao | 15bf6f31 | 2024-08-05 22:00:04 | [diff] [blame] | 638 | // Error occurred during file writing. |
| 639 | inline constexpr int kErrorFailedToWriteFile = 6; |
| 640 | |
| S. Ganesh | 9483f2f | 2024-11-11 14:28:26 | [diff] [blame] | 641 | inline constexpr base::TimeDelta kInitialDelay = base::Seconds(1); |
| Noah Rose Ledesma | d391ac33 | 2022-12-13 21:09:06 | [diff] [blame] | 642 | inline constexpr base::TimeDelta kServerKeepAliveTime = base::Seconds(10); |
| Mila Green | cd91cb4d | 2020-12-30 00:15:45 | [diff] [blame] | 643 | |
| Xiaoling Bao | 760b128a | 2024-10-02 23:17:15 | [diff] [blame] | 644 | inline constexpr base::TimeDelta kCecaConnectionTimeout = base::Seconds(30); |
| 645 | |
| Michael Chang | 1a981f41 | 2021-06-04 21:54:49 | [diff] [blame] | 646 | // The maximum number of server starts before the updater uninstalls itself |
| 647 | // while waiting for the first app registration. |
| S. Ganesh | 2707fe5 | 2022-10-06 21:33:45 | [diff] [blame] | 648 | inline constexpr int kMaxServerStartsBeforeFirstReg = 24; |
| Michael Chang | 1a981f41 | 2021-06-04 21:54:49 | [diff] [blame] | 649 | |
| S. Ganesh | a989f74 | 2023-11-09 18:14:48 | [diff] [blame] | 650 | // Number of tries when an installer returns `ERROR_INSTALL_ALREADY_RUNNING`. |
| 651 | inline constexpr int kNumAlreadyRunningMaxTries = 4; |
| 652 | |
| 653 | // Initial delay between retries when an installer returns |
| 654 | // `ERROR_INSTALL_ALREADY_RUNNING`. |
| 655 | inline constexpr base::TimeDelta kAlreadyRunningRetryInitialDelay = |
| 656 | base::Seconds(5); |
| 657 | |
| S. Ganesh | 2e18360 | 2021-11-29 19:54:18 | [diff] [blame] | 658 | // These are GoogleUpdate error codes, which must be retained by this |
| 659 | // implementation in order to be backward compatible with the existing update |
| 660 | // client code in Chrome. |
| S. Ganesh | 2707fe5 | 2022-10-06 21:33:45 | [diff] [blame] | 661 | inline constexpr int GOOPDATE_E_APP_INSTALL_DISABLED_BY_POLICY = 0x80040812; |
| 662 | inline constexpr int GOOPDATE_E_APP_UPDATE_DISABLED_BY_POLICY = 0x80040813; |
| 663 | inline constexpr int GOOPDATE_E_APP_UPDATE_DISABLED_BY_POLICY_MANUAL = |
| 664 | 0x8004081f; |
| S. Ganesh | 3c91a381b | 2023-11-02 21:59:35 | [diff] [blame] | 665 | inline constexpr int GOOPDATEINSTALL_E_FILENAME_INVALID = 0x80040900; |
| 666 | inline constexpr int GOOPDATEINSTALL_E_INSTALLER_FAILED_START = 0x80040901; |
| S. Ganesh | 2707fe5 | 2022-10-06 21:33:45 | [diff] [blame] | 667 | inline constexpr int GOOPDATEINSTALL_E_INSTALLER_FAILED = 0x80040902; |
| S. Ganesh | 8953850 | 2023-11-03 17:14:16 | [diff] [blame] | 668 | inline constexpr int GOOPDATEINSTALL_E_INSTALLER_TIMED_OUT = 0x80040904; |
| S. Ganesh | a989f74 | 2023-11-09 18:14:48 | [diff] [blame] | 669 | inline constexpr int GOOPDATEINSTALL_E_INSTALL_ALREADY_RUNNING = 0x80040907; |
| S. Ganesh | 2e18360 | 2021-11-29 19:54:18 | [diff] [blame] | 670 | |
| Joshua Pawlicki | f14af82 | 2024-05-22 19:37:11 | [diff] [blame] | 671 | // Install Sources. |
| Avi Drissman | 4263064 | 2024-07-16 14:25:24 | [diff] [blame] | 672 | inline constexpr char kInstallSourceTaggedMetainstaller[] = "taggedmi"; |
| 673 | inline constexpr char kInstallSourceOffline[] = "offline"; |
| 674 | inline constexpr char kInstallSourcePolicy[] = "policy"; |
| 675 | inline constexpr char kInstallSourceOnDemand[] = "ondemand"; |
| Joshua Pawlicki | f14af82 | 2024-05-22 19:37:11 | [diff] [blame] | 676 | |
| S. Ganesh | 52e2c90 | 2025-08-29 01:10:45 | [diff] [blame] | 677 | inline constexpr int kRegistrationSuccess = 0; |
| 678 | inline constexpr int kRegistrationError = 1; |
| 679 | |
| Sorin Jianu | f4f51699e | 2019-03-27 20:39:03 | [diff] [blame] | 680 | } // namespace updater |
| 681 | |
| Sorin Jianu | e066c6a | 2020-02-22 00:28:56 | [diff] [blame] | 682 | #endif // CHROME_UPDATER_CONSTANTS_H_ |