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