1 // Copyright 2016 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 // Defines the struct used to describe each of a brand's install modes; see 6 // install_modes.h for details. For brands that integrate with Google Update, 7 // each mode also describes a strategy for determining its update channel. 8 9 #ifndef CHROME_INSTALL_STATIC_INSTALL_CONSTANTS_H_ 10 #define CHROME_INSTALL_STATIC_INSTALL_CONSTANTS_H_ 11 12 #include <windows.h> 13 14 #include <stdint.h> 15 16 namespace install_static { 17 18 // Identifies different strategies for determining an update channel. 19 enum class ChannelStrategy { 20 // Update channels are not supported. This value is for exclusive use by 21 // brands that do not integrate with Google Update. 22 UNSUPPORTED, 23 // Update channel is determined by parsing the "ap" value in the registry. 24 // This is used by Google Chrome's primary install mode to differentiate the 25 // beta and dev channels from the default stable channel. 26 ADDITIONAL_PARAMETERS, 27 // Update channel is a fixed value. This is used by to pin Google Chrome's SxS 28 // secondary install mode to the canary channel. 29 FIXED, 30 }; 31 32 // A POD-struct defining constants for a brand's install mode. A brand has one 33 // primary and one or more secondary install modes. Refer to kInstallModes in 34 // chromium_install_modes.cc and google_chrome_install_modes.cc for examples of 35 // typical mode definitions. 36 struct InstallConstants { 37 // The size (in bytes) of this structure. This serves to verify that all 38 // modules in a process have the same definition of the struct. 39 size_t size; 40 41 // The brand-specific index/identifier of this instance (defined in a brand's 42 // BRAND_install_modes.h file). Index 0 is reserved for a brand's primary 43 // install mode. 44 int index; 45 46 // The command-line switch originally passed to the installer to select this 47 // install mode. 48 const char* install_switch; 49 50 // The install suffix of a secondary mode (e.g., " SxS" for canary Chrome) or 51 // an empty string for the primary mode. This suffix is appended to file and 52 // registry paths used by the product. 53 const wchar_t* install_suffix; 54 55 // The suffix for the logos corresponding to this install mode. The 56 // VisualElementsManifest generated by the installer will use this suffix to 57 // reference the proper logos so that they appear in the Start Menu. 58 const wchar_t* logo_suffix; 59 60 // The app guid with which this mode is registered with Google Update, or an 61 // empty string if the brand does not integrate with Google Update. 62 const wchar_t* app_guid; 63 64 // The unsuffixed application name of this program. This is the base of the 65 // name registered with Default Programs on Windows. 66 const wchar_t* base_app_name; 67 68 // Used for the following: 69 // * The unsuffixed portion of the AppUserModelId. The AppUserModelId is used 70 // to group an app's windows together on the Windows taskbar along with its 71 // corresponding shortcuts; see 72 // https://msdn.microsoft.com/library/windows/desktop/dd378459.aspx for more 73 // information. Use ShellUtil::GetBrowserModelId to get the suffixed value -- 74 // it is almost never correct to use the unsuffixed (base) portion of this id 75 // directly. 76 // * The prefix for the Elevation Service Name. See 77 // install_static::GetElevationServiceDisplayName() and 78 // install_static::GetElevationServiceName(). 79 // * The prefix of Web App ProgIds. See web_app::GetProgIdForApp. This means 80 // |base_app_id| must only contain alphanumeric characters and 81 // non-leading '.'s. 82 const wchar_t* base_app_id; 83 84 // The prefix for the browser's ProgID. This prefix may be no more than 11 85 // characters long; see ShellUtil::GetBrowserProgId and 86 // https://msdn.microsoft.com/library/windows/desktop/dd542719.aspx. 87 const wchar_t* prog_id_prefix; 88 89 // A human-readable description of the browser, used when registering with 90 // Windows. 91 const wchar_t* prog_id_description; 92 93 // The GUID to be used when registering this install mode for Active Setup. 94 // Active Setup is used to perform certain operations in a user's context for 95 // system-level installs. 96 const wchar_t* active_setup_guid; 97 98 // The legacy CommandExecuteImpl CLSID, or an empty string if this install 99 // mode never included a DelegateExecute verb handler. 100 const wchar_t* legacy_command_execute_clsid; 101 102 // The CLSID of the COM object registered with the Widnows OS. This is for app 103 // activation via user interaction with a toast notification in the Action 104 // Center. 105 CLSID toast_activator_clsid; 106 107 // The CLSID of the COM server that provides silent elevation functionality. 108 CLSID elevator_clsid; 109 110 // The IID and the TypeLib of the IElevator interface that provides silent 111 // elevation functionality. 112 IID elevator_iid; 113 114 // The default name for this mode's update channel. 115 const wchar_t* default_channel_name; 116 117 // The strategy used to determine the mode's update channel, or UNSUPPORTED if 118 // the brand does not integrate with Google Update. 119 ChannelStrategy channel_strategy; 120 121 // True if this mode supports system-level installs. 122 bool supports_system_level; 123 124 // True if this mode supports in-product mechanisms to make the browser the 125 // user's chosen default browser. Features such as the "Make default" button 126 // in chrome://settings are hidden when this is false. 127 bool supports_set_as_default_browser; 128 129 // True if this mode supports user retention experiments run by the installer 130 // following updates. 131 bool supports_retention_experiments; 132 133 // The index of this mode's main application icon in the main executable. 134 int app_icon_resource_index; 135 136 // The resource id of this mode's main application icon. 137 int16_t app_icon_resource_id; 138 139 // The app container sid prefix for sandbox. 140 const wchar_t* sandbox_sid_prefix; 141 }; 142 143 } // namespace install_static 144 145 #endif // CHROME_INSTALL_STATIC_INSTALL_CONSTANTS_H_ 146