15821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Copyright (c) 2012 The Chromium Authors. All rights reserved.
25821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
35821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// found in the LICENSE file.
45821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
55821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "chrome/installer/util/util_constants.h"
65821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
75821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)namespace installer {
85821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
95821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)namespace switches {
105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Whether to set Chrome to launch at computer startup.
125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kAutoLaunchChrome[] = "auto-launch-chrome";
135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Install Chrome.
155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Currently this is only required when used in combination with kMultiInstall.
165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kChrome[] = "chrome";
175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
182a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Install Chrome App Host. This is now interpreted as kChromeAppLauncher.
192a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// TODO(huangs): Remove by M27.
202a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)const char kChromeAppHostDeprecated[] = "app-host";
215821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Install Chrome App Launcher, which subsumes Chrome App Host, i.e.,
235821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// App Launcher install converts App Host to App Launcher, and all subsequent
245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// App Host updates/uninstalls become App Launcher updates/uninstalls.
255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kChromeAppLauncher[] = "app-launcher";
265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Install Chrome Frame.
285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kChromeFrame[] = "chrome-frame";
295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Installs Chrome Frame from an already installed multi-install of Chrome.
315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kChromeFrameQuickEnable[] = "quick-enable-cf";
325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// When installing Chrome Frame, install it in ready mode.
345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// If --chrome-frame is not on the command line, this switch has no effect.
355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kChromeFrameReadyMode[] = "ready-mode";
365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
375821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// GCF ready mode opt-in.  This enables a full installation of GCF.
385821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kChromeFrameReadyModeOptIn[] = "ready-mode-opt-in";
395821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
405821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// GCF ready mode temp opt-out.  This disables the GCF user agent modification
415821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// and detection of headers/meta tags.
425821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kChromeFrameReadyModeTempOptOut[] = "ready-mode-temp-opt-out";
435821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
445821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// End GCF ready mode temp opt-out.  This re-enables the GCF user agent
455821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// modification and detection of headers/meta tags.
465821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kChromeFrameReadyModeEndTempOptOut[] = "ready-mode-end-temp-opt-out";
475821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
485821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Run the installer for Chrome SxS.
495821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kChromeSxS[] = "chrome-sxs";
505821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
515821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Create shortcuts for this user to point to a system-level install (which
525821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// must already be installed on the machine). The shortcuts created will
535821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// match the preferences of the already present system-level install as such
545821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// this option is not compatible with any other installer options.
555821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kConfigureUserSettings[] = "configure-user-settings";
565821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
575821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// The version number of an update containing critical fixes, for which an
585821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// in-use Chrome should be restarted ASAP.
595821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kCriticalUpdateVersion[] = "critical-update-version";
605821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
615821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Delete user profile data. This param is useful only when specified with
625821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// kUninstall, otherwise it is silently ignored.
635821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDeleteProfile[] = "delete-profile";
645821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
655821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disable logging
665821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDisableLogging[] = "disable-logging";
675821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
685821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Prevent installer from launching Chrome after a successful first install.
695821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDoNotLaunchChrome[] = "do-not-launch-chrome";
705821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
715821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Prevents installer from writing the Google Update key that causes Google
725821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Update to launch Chrome after a first install.
735821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDoNotRegisterForUpdateLaunch[] =
745821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    "do-not-register-for-update-launch";
755821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
765821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// By default we remove all shared (between users) files, registry entries etc
775821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// during uninstall. If this option is specified together with kUninstall option
785821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// we do not clean up shared entries otherwise this option is ignored.
795821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDoNotRemoveSharedItems[] = "do-not-remove-shared-items";
805821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
815821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Enable logging at the error level. This is the default behavior.
825821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnableLogging[] = "enable-logging";
835821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
845821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Ensures that Google Update is present at the current level of installation.
855821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kEnsureGoogleUpdatePresent[] = "ensure-google-update-present";
865821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
875821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Same as kConfigureUserSettings above; except the checks to know whether
885821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// first run already occured are bypassed and shortcuts are created either way
895821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// (kConfigureUserSettings also needs to be on the command-line for this to have
905821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// any effect).
915821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kForceConfigureUserSettings[] = "force-configure-user-settings";
925821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
935821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// If present, setup will uninstall chrome without asking for any
945821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// confirmation from user.
955821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kForceUninstall[] = "force-uninstall";
965821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
97ca12bfac764ba476d6cd062bf1dde12cc64c3f40Ben Murdoch// Specify the path to the compressed Chrome archive for install. If not
98ca12bfac764ba476d6cd062bf1dde12cc64c3f40Ben Murdoch// specified, chrome.packed.7z or chrome.7z in the same directory as setup.exe
99ca12bfac764ba476d6cd062bf1dde12cc64c3f40Ben Murdoch// is used (the packed file is preferred; see kUncompressedArchive to force use
100ca12bfac764ba476d6cd062bf1dde12cc64c3f40Ben Murdoch// of an uncompressed archive).
1015821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kInstallArchive[] = "install-archive";
1025821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1035821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Specify the file path of Chrome master preference file.
1045821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kInstallerData[] = "installerdata";
1055821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1065821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// If present, specify file path to write logging info.
1075821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kLogFile[] = "log-file";
1085821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1095821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Register Chrome as default browser on the system. Usually this will require
1105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// that setup is running as admin. If running as admin we try to register
1115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// as default browser at system level, if running as non-admin we try to
1125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// register as default browser only for the current user.
1135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kMakeChromeDefault[] = "make-chrome-default";
1145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
115558790d6acca3451cf3a6b497803a5f07d0bec58Ben Murdoch// Migrate multi-install Chrome Frame to single-install. Use in conjunction with
116558790d6acca3451cf3a6b497803a5f07d0bec58Ben Murdoch// --uncompressed-archive.
117558790d6acca3451cf3a6b497803a5f07d0bec58Ben Murdochconst char kMigrateChromeFrame[] = "migrate-chrome-frame";
118558790d6acca3451cf3a6b497803a5f07d0bec58Ben Murdoch
1195821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Tells installer to expect to be run as a subsidiary to an MSI.
1205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kMsi[] = "msi";
1215821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Tells installer to install multiple products specified on the command line.
1235821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// (e.g. Chrome Frame, Chrome)
1245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kMultiInstall[] = "multi-install";
1255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Useful only when used with --update-setup-exe, otherwise ignored. It
1275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// specifies the full path where updated setup.exe will be stored.
1285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kNewSetupExe[] = "new-setup-exe";
1295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Notify the installer that the OS has been upgraded.
1315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kOnOsUpgrade[] = "on-os-upgrade";
1325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1332a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Determines whether or not EULA has been accepted at some point. Returns via
1342a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// exit code: 0 if EULA not accepted, 1 if EULA accepted, and E_FAIL on error.
1352a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)const char kQueryEULAAcceptance[] = "query-eula-acceptance";
1362a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
1375821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Register Chrome as a valid browser on the current sytem. This option
1385821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// requires that setup.exe is running as admin. If this option is specified,
1395821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// options kInstallArchive and kUninstall are ignored.
1405821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kRegisterChromeBrowser[] = "register-chrome-browser";
1415821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1425821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Used by the installer to forward the registration suffix of the
1435821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// (un)installation in progress when launching an elevated setup.exe to finish
1445821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// registration work.
1455821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kRegisterChromeBrowserSuffix[] = "register-chrome-browser-suffix";
1465821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1475821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Specify the path to the dev build of chrome.exe the user wants to install
1485821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// (register and install Start menu shortcut for) on the system. This will
1495821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// always result in a user-level install and will make this install default
1505821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// browser.
1515821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kRegisterDevChrome[] = "register-dev-chrome";
1525821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1535821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Switch to allow an extra URL protocol to be registered. This option is used
1545821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// in conjunction with kRegisterChromeBrowser to specify an extra protocol
1555821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// in addition to the standard set of protocols.
1565821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kRegisterURLProtocol[] = "register-url-protocol";
1575821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1585821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Renames chrome.exe to old_chrome.exe and renames new_chrome.exe to chrome.exe
1595821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// to support in-use updates. Also deletes opv key.
1605821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kRenameChromeExe[] = "rename-chrome-exe";
1615821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1625821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Removes Chrome registration from current machine. Requires admin rights.
1635821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kRemoveChromeRegistration[] = "remove-chrome-registration";
1645821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1655821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// When we try to relaunch setup.exe as admin on Vista, we append this command
1665821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// line flag so that we try the launch only once.
1675821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kRunAsAdmin[] = "run-as-admin";
1685821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1692a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Combined with --uninstall, signals to setup.exe that this uninstall was
1702a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// triggered by a self-destructing Chrome.
1712a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)const char kSelfDestruct[] = "self-destruct";
1722a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
1735821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Install Chrome to system wise location. The default is per user install.
1745821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kSystemLevel[] = "system-level";
1755821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1765821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// If present, setup will uninstall chrome.
1775821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kUninstall[] = "uninstall";
1785821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1795821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Also see --new-setup-exe. This command line option specifies a diff patch
1805821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// that setup.exe will apply to itself and store the resulting binary in the
1815821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// path given by --new-setup-exe.
1825821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kUpdateSetupExe[] = "update-setup-exe";
1835821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
184ca12bfac764ba476d6cd062bf1dde12cc64c3f40Ben Murdoch// Use the given uncompressed chrome.7z archive as the source of files to
185ca12bfac764ba476d6cd062bf1dde12cc64c3f40Ben Murdoch// install.
186ca12bfac764ba476d6cd062bf1dde12cc64c3f40Ben Murdochconst char kUncompressedArchive[] = "uncompressed-archive";
187ca12bfac764ba476d6cd062bf1dde12cc64c3f40Ben Murdoch
1885821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Enable verbose logging (info level).
1895821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kVerboseLogging[] = "verbose-logging";
1905821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1915821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Show the embedded EULA dialog.
1925821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kShowEula[] = "show-eula";
1935821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1945821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Show the embedded EULA dialog, relaunch metro Chrome on acceptance.
1955821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kShowEulaForMetro[] = "show-eula-for-metro";
1965821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1975821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Perform the inactive user toast experiment.
1985821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kInactiveUserToast[] = "inactive-user-toast";
1995821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2005821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// User toast experiment switch from system context to user context.
2015821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kSystemLevelToast[] = "system-level-toast";
2025821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2035821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// The group this experiment belongs to.
2045821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kExperimentGroup[] = "experiment-group";
2055821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2065821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// A handle value of the key to write the results of the toast experiment
2075821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// to. See DuplicateGoogleUpdateSystemClientKey for details.
2085821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kToastResultsKey[] = "toast-results-key";
2095821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
210eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch// Applies a binary patch to a file. The input, patch, and the output file are
211eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch// specified as command line arguments following the --patch switch.
212eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch// Ex: --patch=courgette --input_file='input' --patch_file='patch'
213eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch//        --output_file='output'
214eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdochconst char kPatch[] = "patch";
215eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdochconst char kInputFile[] = "input-file";
216eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdochconst char kPatchFile[] = "patch-file";
217eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdochconst char kOutputFile[] = "output-file";
218eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch
2195821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)}  // namespace switches
2205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2212a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// The Active Setup executable will be an identical copy of setup.exe; this is
2222a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// necessary because Windows' installer detection heuristics (which include
2232a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// things like process name being "setup.exe") will otherwise force elevation
2242a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// for non-admin users when setup.exe is launched. This is mitigated by adding
2252a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// requestedExecutionLevel="asInvoker" to setup.exe's manifest on Vista+, but
2262a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// there is no such manifest entry on Windows XP (which results in
2272a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// crbug.com/166473).
2282a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// TODO(gab): Rename setup.exe itself altogether and use the same binary for
2292a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Active Setup.
2302a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)const wchar_t kActiveSetupExe[] = L"chrmstp.exe";
2315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kChromeAppHostExe[] = L"app_host.exe";
2325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kChromeDll[] = L"chrome.dll";
233ca12bfac764ba476d6cd062bf1dde12cc64c3f40Ben Murdochconst wchar_t kChromeChildDll[] = L"chrome_child.dll";
2345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kChromeExe[] = L"chrome.exe";
2355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kChromeFrameDll[] = L"npchrome_frame.dll";
2365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kChromeFrameHelperExe[] = L"chrome_frame_helper.exe";
2375821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kChromeFrameHelperWndClass[] = L"ChromeFrameHelperWindowClass";
2385821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kChromeFrameReadyModeField[] = L"ChromeFrameReadyMode";
2395821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kChromeLauncherExe[] = L"chrome_launcher.exe";
2405821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kChromeNewExe[] = L"new_chrome.exe";
2415821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kChromeOldExe[] = L"old_chrome.exe";
2425821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kCmdInstallApp[] = L"install-application";
2432a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)const wchar_t kCmdInstallExtension[] = L"install-extension";
2445821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kCmdOnOsUpgrade[] = L"on-os-upgrade";
2452a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)const wchar_t kCmdQueryEULAAcceptance[] = L"query-eula-acceptance";
2465821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kCmdQuickEnableApplicationHost[] =
2475821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    L"quick-enable-application-host";
2485821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kCmdQuickEnableCf[] = L"quick-enable-cf";
2495821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kDelegateExecuteExe[] = L"delegate_execute.exe";
2505821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kEULASentinelFile[] = L"EULA Accepted";
2515821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kGoogleChromeInstallSubDir1[] = L"Google";
2525821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kGoogleChromeInstallSubDir2[] = L"Chrome";
2535821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kInstallBinaryDir[] = L"Application";
2545821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kInstallerDir[] = L"Installer";
2555821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kInstallTempDir[] = L"Temp";
2565821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kInstallUserDataDir[] = L"User Data";
2575821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kLnkExt[] = L".lnk";
2585821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kNaClExe[] = L"nacl64.exe";
2595821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kSetupExe[] = L"setup.exe";
2605821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kSxSSuffix[] = L" SxS";
2615821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kUninstallStringField[] = L"UninstallString";
2625821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kUninstallArgumentsField[] = L"UninstallArguments";
2635821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kUninstallDisplayNameField[] = L"DisplayName";
2645821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kUninstallMetricsName[] = "uninstall_metrics";
2655821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kUninstallInstallationDate[] = L"installation_date";
2665821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kInstallerError[] = L"InstallerError";
2675821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kInstallerExtraCode1[] = L"InstallerExtraCode1";
2685821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kInstallerResult[] = L"InstallerResult";
2695821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kInstallerResultUIString[] = L"InstallerResultUIString";
2705821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kInstallerSuccessLaunchCmdLine[] =
2715821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    L"InstallerSuccessLaunchCmdLine";
2725821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2735821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kOptionMultiInstall[] = L"multi-install";
2745821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kOptionReadyMode[] = L"ready-mode";
2755821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2765821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Chrome channel display names.
2775821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kChromeChannelUnknown[] = L"unknown";
2785821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kChromeChannelCanary[] = L"canary";
2795821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kChromeChannelDev[] = L"dev";
2805821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kChromeChannelBeta[] = L"beta";
2815821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const wchar_t kChromeChannelStable[] = L"";
2825821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2835821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const size_t kMaxAppModelIdLength = 64U;
2845821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
285eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdochconst char kCourgette[] = "courgette";
286eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdochconst char kBsdiff[] = "bsdiff";
287eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch
2885821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)}  // namespace installer
289