File: install_constants.h

package info (click to toggle)
chromium 139.0.7258.127-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 6,122,068 kB
  • sloc: cpp: 35,100,771; ansic: 7,163,530; javascript: 4,103,002; python: 1,436,920; asm: 946,517; xml: 746,709; pascal: 187,653; perl: 88,691; sh: 88,436; objc: 79,953; sql: 51,488; cs: 44,583; fortran: 24,137; makefile: 22,147; tcl: 15,277; php: 13,980; yacc: 8,984; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (172 lines) | stat: -rw-r--r-- 7,057 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Defines the struct used to describe each of a brand's install modes; see
// install_modes.h for details. For brands that integrate with Google Update,
// each mode also describes a strategy for determining its update channel.

#ifndef CHROME_INSTALL_STATIC_INSTALL_CONSTANTS_H_
#define CHROME_INSTALL_STATIC_INSTALL_CONSTANTS_H_

#include <windows.h>

#include <stdint.h>

#include "chrome/install_static/buildflags.h"

namespace install_static {

// Identifies different strategies for determining an update channel.
enum class ChannelStrategy {
#if BUILDFLAG(USE_GOOGLE_UPDATE_INTEGRATION)
  // The default update channel may be overridden by an explicit value. The
  // installer gets this value on the command line (--channel=name), whereas the
  // browser gets this value from the Windows registry. This is used by Google
  // Chrome's primary install mode to differentiate the extended stable, beta,
  // and dev channels from the default (stable) channel.
  FLOATING,

  // Update channel is a fixed value. This is used by to pin Google Chrome's
  // secondary install modes to their respective channels (e.g., the SxS mode
  // follows the canary channel).
  FIXED,
#else   // BUILDFLAG(USE_GOOGLE_UPDATE_INTEGRATION)
  // Update channels are not supported. This value is for exclusive use by
  // brands that do not integrate with Google Update.
  UNSUPPORTED,
#endif  // BUILDFLAG(USE_GOOGLE_UPDATE_INTEGRATION)
};

// A POD-struct defining constants for a brand's install mode. A brand has one
// primary and one or more secondary install modes. Refer to kInstallModes in
// chromium_install_modes.cc and google_chrome_install_modes.cc for examples of
// typical mode definitions.
struct InstallConstants {
  // The size (in bytes) of this structure. This serves to verify that all
  // modules in a process have the same definition of the struct.
  size_t size;

  // The brand-specific index/identifier of this instance (defined in a brand's
  // BRAND_install_modes.h file). Index 0 is reserved for a brand's primary
  // install mode.
  int index;

  // The command-line switch originally passed to the installer to select this
  // install mode.
  const char* install_switch;

  // The install suffix of a secondary mode (e.g., " SxS" for canary Chrome) or
  // an empty string for the primary mode. This suffix is appended to file and
  // registry paths used by the product.
  const wchar_t* install_suffix;

  // The suffix for the logos corresponding to this install mode. The
  // VisualElementsManifest generated by the installer will use this suffix to
  // reference the proper logos so that they appear in the Start Menu.
  const wchar_t* logo_suffix;

  // The app guid with which this mode is registered with Google Update, or an
  // empty string if the brand does not integrate with Google Update.
  const wchar_t* app_guid;

  // The unsuffixed application name of this program. This is the base of the
  // name registered with Default Programs on Windows.
  const wchar_t* base_app_name;

  // Used for the following:
  // * The unsuffixed portion of the AppUserModelId. The AppUserModelId is used
  // to group an app's windows together on the Windows taskbar along with its
  // corresponding shortcuts; see
  // https://msdn.microsoft.com/library/windows/desktop/dd378459.aspx for more
  // information. Use ShellUtil::GetBrowserModelId to get the suffixed value --
  // it is almost never correct to use the unsuffixed (base) portion of this id
  // directly.
  // * The prefix for the Elevation Service Name. See
  // install_static::GetElevationServiceDisplayName() and
  // install_static::GetElevationServiceName().
  // * The prefix of Web App ProgIds. See web_app::GetProgIdForApp. This means
  // |base_app_id| must only contain alphanumeric characters and
  // non-leading '.'s.
  const wchar_t* base_app_id;

  // The prefix for the browser's ProgID. This prefix may be no more than 11
  // characters long; see ShellUtil::GetBrowserProgId and
  // https://msdn.microsoft.com/library/windows/desktop/dd542719.aspx.
  const wchar_t* browser_prog_id_prefix;

  // A human-readable description of the browser, used when registering with
  // Windows.
  const wchar_t* browser_prog_id_description;

  // The prefix for the browser pdf viewer's ProgID.  This prefix may be no more
  // than 11 characters long; see ShellUtil::GetBrowserProgId and
  // https://msdn.microsoft.com/library/windows/desktop/dd542719.aspx.
  const wchar_t* pdf_prog_id_prefix;

  // A human-readable description of the pdf viewer, used when registering with
  // Windows.
  const wchar_t* pdf_prog_id_description;

  // The GUID to be used when registering this install mode for Active Setup.
  // Active Setup is used to perform certain operations in a user's context for
  // system-level installs.
  const wchar_t* active_setup_guid;

  // The legacy CommandExecuteImpl CLSID, or an empty string if this install
  // mode never included a DelegateExecute verb handler.
  const wchar_t* legacy_command_execute_clsid;

  // The CLSID of the COM object registered with the Widnows OS. This is for app
  // activation via user interaction with a toast notification in the Action
  // Center.
  CLSID toast_activator_clsid;

  // The CLSID of the COM server that provides silent elevation functionality.
  CLSID elevator_clsid;

  // The IID and the TypeLib of the IElevator interface that provides silent
  // elevation functionality.
  IID elevator_iid;

  // The CLSID of the COM server that provides ETW tracing functionality.
  CLSID tracing_service_clsid;

  // The IID and the TypeLib of the ISystemTraceSession interface that provides
  // ETW tracing functionality.
  IID tracing_service_iid;

  // The default name for this mode's update channel.
  const wchar_t* default_channel_name;

  // The strategy used to determine the mode's update channel, or UNSUPPORTED if
  // the brand does not integrate with Google Update.
  ChannelStrategy channel_strategy;

  // True if this mode supports system-level installs.
  bool supports_system_level;

  // True if this mode supports in-product mechanisms to make the browser the
  // user's chosen default browser. Features such as the "Make default" button
  // in chrome://settings are hidden when this is false.
  bool supports_set_as_default_browser;

  // The index of this mode's main application icon in the main executable.
  int app_icon_resource_index;

  // The resource id of this mode's main application icon.
  int16_t app_icon_resource_id;

  //  The index of this mode's html doc icon in the main executable.
  int html_doc_icon_resource_index;

  // The index of this mode's pdf doc icon in the main executable.
  int pdf_doc_icon_resource_index;

  // The app container sid prefix for sandbox.
  const wchar_t* sandbox_sid_prefix;
};

}  // namespace install_static

#endif  // CHROME_INSTALL_STATIC_INSTALL_CONSTANTS_H_