util_constants.cc revision eb525c5499e34cc9c4b825d6d9e75bb07cc06ace
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#include "chrome/installer/util/util_constants.h" 6 7namespace installer { 8 9namespace switches { 10 11// Whether to set Chrome to launch at computer startup. 12const char kAutoLaunchChrome[] = "auto-launch-chrome"; 13 14// Install Chrome. 15// Currently this is only required when used in combination with kMultiInstall. 16const char kChrome[] = "chrome"; 17 18// Install Chrome App Host. This is now interpreted as kChromeAppLauncher. 19// TODO(huangs): Remove by M27. 20const char kChromeAppHostDeprecated[] = "app-host"; 21 22// Install Chrome App Launcher, which subsumes Chrome App Host, i.e., 23// App Launcher install converts App Host to App Launcher, and all subsequent 24// App Host updates/uninstalls become App Launcher updates/uninstalls. 25const char kChromeAppLauncher[] = "app-launcher"; 26 27// Install Chrome Frame. 28const char kChromeFrame[] = "chrome-frame"; 29 30// Installs Chrome Frame from an already installed multi-install of Chrome. 31const char kChromeFrameQuickEnable[] = "quick-enable-cf"; 32 33// When installing Chrome Frame, install it in ready mode. 34// If --chrome-frame is not on the command line, this switch has no effect. 35const char kChromeFrameReadyMode[] = "ready-mode"; 36 37// GCF ready mode opt-in. This enables a full installation of GCF. 38const char kChromeFrameReadyModeOptIn[] = "ready-mode-opt-in"; 39 40// GCF ready mode temp opt-out. This disables the GCF user agent modification 41// and detection of headers/meta tags. 42const char kChromeFrameReadyModeTempOptOut[] = "ready-mode-temp-opt-out"; 43 44// End GCF ready mode temp opt-out. This re-enables the GCF user agent 45// modification and detection of headers/meta tags. 46const char kChromeFrameReadyModeEndTempOptOut[] = "ready-mode-end-temp-opt-out"; 47 48// Run the installer for Chrome SxS. 49const char kChromeSxS[] = "chrome-sxs"; 50 51// Create shortcuts for this user to point to a system-level install (which 52// must already be installed on the machine). The shortcuts created will 53// match the preferences of the already present system-level install as such 54// this option is not compatible with any other installer options. 55const char kConfigureUserSettings[] = "configure-user-settings"; 56 57// The version number of an update containing critical fixes, for which an 58// in-use Chrome should be restarted ASAP. 59const char kCriticalUpdateVersion[] = "critical-update-version"; 60 61// Delete user profile data. This param is useful only when specified with 62// kUninstall, otherwise it is silently ignored. 63const char kDeleteProfile[] = "delete-profile"; 64 65// Disable logging 66const char kDisableLogging[] = "disable-logging"; 67 68// Prevent installer from launching Chrome after a successful first install. 69const char kDoNotLaunchChrome[] = "do-not-launch-chrome"; 70 71// Prevents installer from writing the Google Update key that causes Google 72// Update to launch Chrome after a first install. 73const char kDoNotRegisterForUpdateLaunch[] = 74 "do-not-register-for-update-launch"; 75 76// By default we remove all shared (between users) files, registry entries etc 77// during uninstall. If this option is specified together with kUninstall option 78// we do not clean up shared entries otherwise this option is ignored. 79const char kDoNotRemoveSharedItems[] = "do-not-remove-shared-items"; 80 81// Enable logging at the error level. This is the default behavior. 82const char kEnableLogging[] = "enable-logging"; 83 84// Ensures that Google Update is present at the current level of installation. 85const char kEnsureGoogleUpdatePresent[] = "ensure-google-update-present"; 86 87// Same as kConfigureUserSettings above; except the checks to know whether 88// first run already occured are bypassed and shortcuts are created either way 89// (kConfigureUserSettings also needs to be on the command-line for this to have 90// any effect). 91const char kForceConfigureUserSettings[] = "force-configure-user-settings"; 92 93// If present, setup will uninstall chrome without asking for any 94// confirmation from user. 95const char kForceUninstall[] = "force-uninstall"; 96 97// Specify the file path of Chrome archive for install. 98const char kInstallArchive[] = "install-archive"; 99 100// Specify the file path of Chrome master preference file. 101const char kInstallerData[] = "installerdata"; 102 103// If present, specify file path to write logging info. 104const char kLogFile[] = "log-file"; 105 106// Register Chrome as default browser on the system. Usually this will require 107// that setup is running as admin. If running as admin we try to register 108// as default browser at system level, if running as non-admin we try to 109// register as default browser only for the current user. 110const char kMakeChromeDefault[] = "make-chrome-default"; 111 112// Tells installer to expect to be run as a subsidiary to an MSI. 113const char kMsi[] = "msi"; 114 115// Tells installer to install multiple products specified on the command line. 116// (e.g. Chrome Frame, Chrome) 117const char kMultiInstall[] = "multi-install"; 118 119// Useful only when used with --update-setup-exe, otherwise ignored. It 120// specifies the full path where updated setup.exe will be stored. 121const char kNewSetupExe[] = "new-setup-exe"; 122 123// Notify the installer that the OS has been upgraded. 124const char kOnOsUpgrade[] = "on-os-upgrade"; 125 126// Determines whether or not EULA has been accepted at some point. Returns via 127// exit code: 0 if EULA not accepted, 1 if EULA accepted, and E_FAIL on error. 128const char kQueryEULAAcceptance[] = "query-eula-acceptance"; 129 130// Register Chrome as a valid browser on the current sytem. This option 131// requires that setup.exe is running as admin. If this option is specified, 132// options kInstallArchive and kUninstall are ignored. 133const char kRegisterChromeBrowser[] = "register-chrome-browser"; 134 135// Used by the installer to forward the registration suffix of the 136// (un)installation in progress when launching an elevated setup.exe to finish 137// registration work. 138const char kRegisterChromeBrowserSuffix[] = "register-chrome-browser-suffix"; 139 140// Specify the path to the dev build of chrome.exe the user wants to install 141// (register and install Start menu shortcut for) on the system. This will 142// always result in a user-level install and will make this install default 143// browser. 144const char kRegisterDevChrome[] = "register-dev-chrome"; 145 146// Switch to allow an extra URL protocol to be registered. This option is used 147// in conjunction with kRegisterChromeBrowser to specify an extra protocol 148// in addition to the standard set of protocols. 149const char kRegisterURLProtocol[] = "register-url-protocol"; 150 151// Renames chrome.exe to old_chrome.exe and renames new_chrome.exe to chrome.exe 152// to support in-use updates. Also deletes opv key. 153const char kRenameChromeExe[] = "rename-chrome-exe"; 154 155// Removes Chrome registration from current machine. Requires admin rights. 156const char kRemoveChromeRegistration[] = "remove-chrome-registration"; 157 158// When we try to relaunch setup.exe as admin on Vista, we append this command 159// line flag so that we try the launch only once. 160const char kRunAsAdmin[] = "run-as-admin"; 161 162// Combined with --uninstall, signals to setup.exe that this uninstall was 163// triggered by a self-destructing Chrome. 164const char kSelfDestruct[] = "self-destruct"; 165 166// Install Chrome to system wise location. The default is per user install. 167const char kSystemLevel[] = "system-level"; 168 169// If present, setup will uninstall chrome. 170const char kUninstall[] = "uninstall"; 171 172// Also see --new-setup-exe. This command line option specifies a diff patch 173// that setup.exe will apply to itself and store the resulting binary in the 174// path given by --new-setup-exe. 175const char kUpdateSetupExe[] = "update-setup-exe"; 176 177// Enable verbose logging (info level). 178const char kVerboseLogging[] = "verbose-logging"; 179 180// Show the embedded EULA dialog. 181const char kShowEula[] = "show-eula"; 182 183// Show the embedded EULA dialog, relaunch metro Chrome on acceptance. 184const char kShowEulaForMetro[] = "show-eula-for-metro"; 185 186// Perform the inactive user toast experiment. 187const char kInactiveUserToast[] = "inactive-user-toast"; 188 189// User toast experiment switch from system context to user context. 190const char kSystemLevelToast[] = "system-level-toast"; 191 192// The group this experiment belongs to. 193const char kExperimentGroup[] = "experiment-group"; 194 195// A handle value of the key to write the results of the toast experiment 196// to. See DuplicateGoogleUpdateSystemClientKey for details. 197const char kToastResultsKey[] = "toast-results-key"; 198 199// Applies a binary patch to a file. The input, patch, and the output file are 200// specified as command line arguments following the --patch switch. 201// Ex: --patch=courgette --input_file='input' --patch_file='patch' 202// --output_file='output' 203const char kPatch[] = "patch"; 204const char kInputFile[] = "input-file"; 205const char kPatchFile[] = "patch-file"; 206const char kOutputFile[] = "output-file"; 207 208} // namespace switches 209 210// The Active Setup executable will be an identical copy of setup.exe; this is 211// necessary because Windows' installer detection heuristics (which include 212// things like process name being "setup.exe") will otherwise force elevation 213// for non-admin users when setup.exe is launched. This is mitigated by adding 214// requestedExecutionLevel="asInvoker" to setup.exe's manifest on Vista+, but 215// there is no such manifest entry on Windows XP (which results in 216// crbug.com/166473). 217// TODO(gab): Rename setup.exe itself altogether and use the same binary for 218// Active Setup. 219const wchar_t kActiveSetupExe[] = L"chrmstp.exe"; 220const wchar_t kChromeAppHostExe[] = L"app_host.exe"; 221const wchar_t kChromeDll[] = L"chrome.dll"; 222const wchar_t kChromeExe[] = L"chrome.exe"; 223const wchar_t kChromeFrameDll[] = L"npchrome_frame.dll"; 224const wchar_t kChromeFrameHelperExe[] = L"chrome_frame_helper.exe"; 225const wchar_t kChromeFrameHelperWndClass[] = L"ChromeFrameHelperWindowClass"; 226const wchar_t kChromeFrameReadyModeField[] = L"ChromeFrameReadyMode"; 227const wchar_t kChromeLauncherExe[] = L"chrome_launcher.exe"; 228const wchar_t kChromeNewExe[] = L"new_chrome.exe"; 229const wchar_t kChromeOldExe[] = L"old_chrome.exe"; 230const wchar_t kCmdInstallApp[] = L"install-application"; 231const wchar_t kCmdInstallExtension[] = L"install-extension"; 232const wchar_t kCmdOnOsUpgrade[] = L"on-os-upgrade"; 233const wchar_t kCmdQueryEULAAcceptance[] = L"query-eula-acceptance"; 234const wchar_t kCmdQuickEnableApplicationHost[] = 235 L"quick-enable-application-host"; 236const wchar_t kCmdQuickEnableCf[] = L"quick-enable-cf"; 237const wchar_t kDelegateExecuteExe[] = L"delegate_execute.exe"; 238const wchar_t kEULASentinelFile[] = L"EULA Accepted"; 239const wchar_t kGoogleChromeInstallSubDir1[] = L"Google"; 240const wchar_t kGoogleChromeInstallSubDir2[] = L"Chrome"; 241const wchar_t kInstallBinaryDir[] = L"Application"; 242const wchar_t kInstallerDir[] = L"Installer"; 243const wchar_t kInstallTempDir[] = L"Temp"; 244const wchar_t kInstallUserDataDir[] = L"User Data"; 245const wchar_t kLnkExt[] = L".lnk"; 246const wchar_t kNaClExe[] = L"nacl64.exe"; 247const wchar_t kSetupExe[] = L"setup.exe"; 248const wchar_t kSxSSuffix[] = L" SxS"; 249const wchar_t kUninstallStringField[] = L"UninstallString"; 250const wchar_t kUninstallArgumentsField[] = L"UninstallArguments"; 251const wchar_t kUninstallDisplayNameField[] = L"DisplayName"; 252const char kUninstallMetricsName[] = "uninstall_metrics"; 253const wchar_t kUninstallInstallationDate[] = L"installation_date"; 254const wchar_t kInstallerError[] = L"InstallerError"; 255const wchar_t kInstallerExtraCode1[] = L"InstallerExtraCode1"; 256const wchar_t kInstallerResult[] = L"InstallerResult"; 257const wchar_t kInstallerResultUIString[] = L"InstallerResultUIString"; 258const wchar_t kInstallerSuccessLaunchCmdLine[] = 259 L"InstallerSuccessLaunchCmdLine"; 260 261const wchar_t kOptionMultiInstall[] = L"multi-install"; 262const wchar_t kOptionReadyMode[] = L"ready-mode"; 263 264// Chrome channel display names. 265const wchar_t kChromeChannelUnknown[] = L"unknown"; 266const wchar_t kChromeChannelCanary[] = L"canary"; 267const wchar_t kChromeChannelDev[] = L"dev"; 268const wchar_t kChromeChannelBeta[] = L"beta"; 269const wchar_t kChromeChannelStable[] = L""; 270 271const size_t kMaxAppModelIdLength = 64U; 272 273const char kCourgette[] = "courgette"; 274const char kBsdiff[] = "bsdiff"; 275 276} // namespace installer 277