Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / installer / util / util_constants.cc
bloba1afbcd33f9cf11681db3df4695c28614aac46ef
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.
5 #include "chrome/installer/util/util_constants.h"
7 namespace installer {
9 namespace switches {
11 // Whether to set Chrome to launch at computer startup.
12 const char kAutoLaunchChrome[] = "auto-launch-chrome";
14 // Install Chrome.
15 // Currently this is only required when used in combination with kMultiInstall.
16 const char kChrome[] = "chrome";
18 // Install Chrome Frame.
19 const char kChromeFrame[] = "chrome-frame";
21 // Run the installer for Chrome SxS.
22 const char kChromeSxS[] = "chrome-sxs";
24 // Create shortcuts for this user to point to a system-level install (which
25 // must already be installed on the machine). The shortcuts created will
26 // match the preferences of the already present system-level install as such
27 // this option is not compatible with any other installer options.
28 const char kConfigureUserSettings[] = "configure-user-settings";
30 // The version number of an update containing critical fixes, for which an
31 // in-use Chrome should be restarted ASAP.
32 const char kCriticalUpdateVersion[] = "critical-update-version";
34 // Delete user profile data. This param is useful only when specified with
35 // kUninstall, otherwise it is silently ignored.
36 const char kDeleteProfile[] = "delete-profile";
38 // Disable logging
39 const char kDisableLogging[] = "disable-logging";
41 // Prevent installer from launching Chrome after a successful first install.
42 const char kDoNotLaunchChrome[] = "do-not-launch-chrome";
44 // Prevents installer from writing the Google Update key that causes Google
45 // Update to launch Chrome after a first install.
46 const char kDoNotRegisterForUpdateLaunch[] =
47 "do-not-register-for-update-launch";
49 // By default we remove all shared (between users) files, registry entries etc
50 // during uninstall. If this option is specified together with kUninstall option
51 // we do not clean up shared entries otherwise this option is ignored.
52 const char kDoNotRemoveSharedItems[] = "do-not-remove-shared-items";
54 // Enable logging at the error level. This is the default behavior.
55 const char kEnableLogging[] = "enable-logging";
57 // Same as kConfigureUserSettings above; except the checks to know whether
58 // first run already occured are bypassed and shortcuts are created either way
59 // (kConfigureUserSettings also needs to be on the command-line for this to have
60 // any effect).
61 const char kForceConfigureUserSettings[] = "force-configure-user-settings";
63 // If present, setup will uninstall chrome without asking for any
64 // confirmation from user.
65 const char kForceUninstall[] = "force-uninstall";
67 // Specify the path to the compressed Chrome archive for install. If not
68 // specified, chrome.packed.7z or chrome.7z in the same directory as setup.exe
69 // is used (the packed file is preferred; see kUncompressedArchive to force use
70 // of an uncompressed archive).
71 const char kInstallArchive[] = "install-archive";
73 // Specify the file path of Chrome master preference file.
74 const char kInstallerData[] = "installerdata";
76 // If present, specify file path to write logging info.
77 const char kLogFile[] = "log-file";
79 // Register Chrome as default browser on the system. Usually this will require
80 // that setup is running as admin. If running as admin we try to register
81 // as default browser at system level, if running as non-admin we try to
82 // register as default browser only for the current user.
83 const char kMakeChromeDefault[] = "make-chrome-default";
85 // Tells installer to expect to be run as a subsidiary to an MSI.
86 const char kMsi[] = "msi";
88 // Tells installer to install multiple products specified on the command line.
89 // (e.g. Chrome Frame, Chrome)
90 const char kMultiInstall[] = "multi-install";
92 // Useful only when used with --update-setup-exe, otherwise ignored. It
93 // specifies the full path where updated setup.exe will be stored.
94 const char kNewSetupExe[] = "new-setup-exe";
96 // Notify the installer that the OS has been upgraded.
97 const char kOnOsUpgrade[] = "on-os-upgrade";
99 // Provide the previous version that patch is for.
100 const char kPreviousVersion[] = "previous-version";
102 // Requests that setup attempt to reenable autoupdates for Chrome.
103 const char kReenableAutoupdates[] = "reenable-autoupdates";
105 // Register Chrome as a valid browser on the current system. This option
106 // requires that setup.exe is running as admin. If this option is specified,
107 // options kInstallArchive and kUninstall are ignored.
108 const char kRegisterChromeBrowser[] = "register-chrome-browser";
110 // Used by the installer to forward the registration suffix of the
111 // (un)installation in progress when launching an elevated setup.exe to finish
112 // registration work.
113 const char kRegisterChromeBrowserSuffix[] = "register-chrome-browser-suffix";
115 // Specify the path to the dev build of chrome.exe the user wants to install
116 // (register and install Start menu shortcut for) on the system. This will
117 // always result in a user-level install and will make this install default
118 // browser.
119 const char kRegisterDevChrome[] = "register-dev-chrome";
121 // Switch to allow an extra URL protocol to be registered. This option is used
122 // in conjunction with kRegisterChromeBrowser to specify an extra protocol
123 // in addition to the standard set of protocols.
124 const char kRegisterURLProtocol[] = "register-url-protocol";
126 // Renames chrome.exe to old_chrome.exe and renames new_chrome.exe to chrome.exe
127 // to support in-use updates. Also deletes opv key.
128 const char kRenameChromeExe[] = "rename-chrome-exe";
130 // Removes Chrome registration from current machine. Requires admin rights.
131 const char kRemoveChromeRegistration[] = "remove-chrome-registration";
133 // When we try to relaunch setup.exe as admin on Vista, we append this command
134 // line flag so that we try the launch only once.
135 const char kRunAsAdmin[] = "run-as-admin";
137 // Combined with --uninstall, signals to setup.exe that this uninstall was
138 // triggered by a self-destructing Chrome.
139 const char kSelfDestruct[] = "self-destruct";
141 // Install Chrome to system wise location. The default is per user install.
142 const char kSystemLevel[] = "system-level";
144 // Signals to setup.exe that it should trigger the active setup command.
145 const char kTriggerActiveSetup[] = "trigger-active-setup";
147 // If present, setup will uninstall chrome.
148 const char kUninstall[] = "uninstall";
150 // Also see --new-setup-exe. This command line option specifies a diff patch
151 // that setup.exe will apply to itself and store the resulting binary in the
152 // path given by --new-setup-exe.
153 const char kUpdateSetupExe[] = "update-setup-exe";
155 // Use the given uncompressed chrome.7z archive as the source of files to
156 // install.
157 const char kUncompressedArchive[] = "uncompressed-archive";
159 // Enable verbose logging (info level).
160 const char kVerboseLogging[] = "verbose-logging";
162 // Show the embedded EULA dialog.
163 const char kShowEula[] = "show-eula";
165 // Show the embedded EULA dialog, relaunch metro Chrome on acceptance.
166 const char kShowEulaForMetro[] = "show-eula-for-metro";
168 // Perform the inactive user toast experiment.
169 const char kInactiveUserToast[] = "inactive-user-toast";
171 // User toast experiment switch from system context to user context.
172 const char kSystemLevelToast[] = "system-level-toast";
174 // The group this experiment belongs to.
175 const char kExperimentGroup[] = "experiment-group";
177 // A handle value of the key to write the results of the toast experiment
178 // to. See DuplicateGoogleUpdateSystemClientKey for details.
179 const char kToastResultsKey[] = "toast-results-key";
181 // Applies a binary patch to a file. The input, patch, and the output file are
182 // specified as command line arguments following the --patch switch.
183 // Ex: --patch=courgette --input_file='input' --patch_file='patch'
184 // --output_file='output'
185 const char kPatch[] = "patch";
186 const char kInputFile[] = "input-file";
187 const char kPatchFile[] = "patch-file";
188 const char kOutputFile[] = "output-file";
190 } // namespace switches
192 namespace env_vars {
194 // The presence of this environment variable with a value of 1 implies that
195 // setup.exe should run as a system installation regardless of what is on the
196 // command line.
197 const char kGoogleUpdateIsMachineEnvVar[] = "GoogleUpdateIsMachine";
199 } // namespace env_vars
201 // The Active Setup executable will be an identical copy of setup.exe; this is
202 // necessary because Windows' installer detection heuristics (which include
203 // things like process name being "setup.exe") will otherwise force elevation
204 // for non-admin users when setup.exe is launched. This is mitigated by adding
205 // requestedExecutionLevel="asInvoker" to setup.exe's manifest on Vista+, but
206 // there is no such manifest entry on Windows XP (which results in
207 // crbug.com/166473).
208 // TODO(gab): Rename setup.exe itself altogether and use the same binary for
209 // Active Setup.
210 const wchar_t kActiveSetupExe[] = L"chrmstp.exe";
211 const wchar_t kAppLauncherGuid[] = L"{FDA71E6F-AC4C-4a00-8B70-9958A68906BF}";
212 const wchar_t kChromeDll[] = L"chrome.dll";
213 const wchar_t kChromeChildDll[] = L"chrome_child.dll";
214 const wchar_t kChromeExe[] = L"chrome.exe";
215 const wchar_t kChromeFrameDll[] = L"npchrome_frame.dll";
216 const wchar_t kChromeFrameHelperDll[] = L"chrome_frame_helper.dll";
217 const wchar_t kChromeFrameHelperExe[] = L"chrome_frame_helper.exe";
218 const wchar_t kChromeFrameHelperWndClass[] = L"ChromeFrameHelperWindowClass";
219 const wchar_t kChromeLauncherExe[] = L"chrome_launcher.exe";
220 const wchar_t kChromeMetroDll[] = L"metro_driver.dll";
221 const wchar_t kChromeNewExe[] = L"new_chrome.exe";
222 const wchar_t kChromeOldExe[] = L"old_chrome.exe";
223 const wchar_t kCmdOnOsUpgrade[] = L"on-os-upgrade";
224 const wchar_t kCmdQuickEnableCf[] = L"quick-enable-cf";
225 const wchar_t kDelegateExecuteExe[] = L"delegate_execute.exe";
226 const wchar_t kEULASentinelFile[] = L"EULA Accepted";
227 const wchar_t kGoogleChromeInstallSubDir1[] = L"Google";
228 const wchar_t kGoogleChromeInstallSubDir2[] = L"Chrome";
229 const wchar_t kInstallBinaryDir[] = L"Application";
230 const wchar_t kInstallerDir[] = L"Installer";
231 const wchar_t kInstallTempDir[] = L"Temp";
232 const wchar_t kLnkExt[] = L".lnk";
233 const wchar_t kNaClExe[] = L"nacl64.exe";
234 const wchar_t kSetupExe[] = L"setup.exe";
235 const wchar_t kSxSSuffix[] = L" SxS";
236 const wchar_t kUninstallStringField[] = L"UninstallString";
237 const wchar_t kUninstallArgumentsField[] = L"UninstallArguments";
238 const wchar_t kUninstallDisplayNameField[] = L"DisplayName";
239 const char kUninstallMetricsName[] = "uninstall_metrics";
240 const wchar_t kUninstallInstallationDate[] = L"installation_date";
241 const wchar_t kInstallerError[] = L"InstallerError";
242 const wchar_t kInstallerExtraCode1[] = L"InstallerExtraCode1";
243 const wchar_t kInstallerResult[] = L"InstallerResult";
244 const wchar_t kInstallerResultUIString[] = L"InstallerResultUIString";
245 const wchar_t kInstallerSuccessLaunchCmdLine[] =
246 L"InstallerSuccessLaunchCmdLine";
248 const wchar_t kOptionMultiInstall[] = L"multi-install";
250 // Chrome channel display names.
251 const wchar_t kChromeChannelUnknown[] = L"unknown";
252 const wchar_t kChromeChannelCanary[] = L"canary";
253 const wchar_t kChromeChannelDev[] = L"dev";
254 const wchar_t kChromeChannelBeta[] = L"beta";
255 const wchar_t kChromeChannelStable[] = L"";
256 const wchar_t kChromeChannelStableExplicit[] = L"stable";
258 const size_t kMaxAppModelIdLength = 64U;
260 const char kCourgette[] = "courgette";
261 const char kBsdiff[] = "bsdiff";
263 } // namespace installer