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 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536
|
// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
edition = "2023";
option optimize_for = LITE_RUNTIME;
option java_package = "org.chromium.components.variations";
package variations;
import "layer.proto";
option features.enum_type = CLOSED;
option features.utf8_validation = NONE;
// This defines the Protocol Buffer representation of a Chrome Variations study
// as sent to clients of the Variations server.
//
// Next tag: 19
message Study {
// The name of the study. Should not contain spaces or special characters.
// Ex: "my_study"
string name = 1 [features.field_presence = LEGACY_REQUIRED];
// DEPRECATED: Prefer end_date instead.
// The expiry date of the study in Unix time format. (Seconds since midnight
// January 1, 1970 UTC). See: http://en.wikipedia.org/wiki/Unix_time
//
// A study that has expired will be disabled, and users will be assigned
// groups based on the default_experiment_name. This will take precedence over
// a corresponding hardcoded field trial in the client.
//
// Ex: 1330893974 (corresponds to 2012-03-04 20:46:14Z)
int64 expiry_date = 3;
// Consistency setting for a study.
enum Consistency {
// OPEN enum type causes unknown values get preserved in the field directly,
// as opposed to the field defaulting to the first value. We then validate
// this explicitly in processed_study.cc.
option features.enum_type = OPEN;
SESSION = 0; // Can't change within a session.
PERMANENT = 1; // Can't change for a given user.
}
// Consistency setting for this study.
// Ex: PERMANENT
Consistency consistency = 7 [default = SESSION];
// Optionally specifies which layer the study is a part of. A study must
// specify both the ID of the layer and the ID(s) of the layer member(s)
// within that layer to which the study should be constrained.
LayerMemberReference layer = 16;
// Name of the experiment that gets the default experience. This experiment
// must be included in the list below. If not specified, a generic default
// experiment name is used.
// Ex: "default"
string default_experiment_name = 8;
// Specifies under which conditions a |google_web_experiment_id| or
// |google_web_trigger_experiment_id| is visible to Google web properties.
enum GoogleWebVisibility {
// Eligible requests to Google web properties include the experiment ID. See
// AppendHeaderIfNeeded() in variations_http_headers.cc for eligibility
// details.
ANY = 0;
// Only requests initiated from a first-party context include the
// experiment ID.
//
// The following requests are considered to be from a first-party context:
// requests initiated by (i) the browser, (ii) a Chrome internal page,
// (iii) a main frame with a Google-owned domain, and (iv) a subframe
// whose associated main frame has a Google-owned domain. See
// IsFirstPartyContext() in variations_http_headers.cc for details.
FIRST_PARTY = 1;
}
// The starting timestamp for Google web visibility, in Unix time format
// (seconds since epoch; midnight January 1, 1970 UTC). It specifies the date
// and time when Google web visibility should commence once this experiment
// is activated. If not set, or 0, the experiment becomes visible immediately
// upon activation.
int64 google_web_visibility_start_date = 17;
// The ending timestamp for Google web visibility, in Unix time format
// (seconds since epoch; midnight January 1, 1970 UTC). It specifies the date
// and time when Google web visibility should cease if this experiment
// is active. If not set, or 0, the experiment remains visible once
// activated.
int64 google_web_visibility_end_date = 18;
// An experiment within the study.
//
// Next tag: 17
message Experiment {
// A named parameter value for this experiment.
//
// Next tag: 3
message Param {
// The name of the parameter.
string name = 1;
// The value of the parameter.
string value = 2;
}
// The name of the experiment within the study.
// Ex: "bucketA"
string name = 1 [features.field_presence = LEGACY_REQUIRED];
// The cut of the total probability taken for this experiment (the x in
// x / N, where N is the sum of all x’s). Ex: "50"
uint32 probability_weight = 2 [features.field_presence = LEGACY_REQUIRED];
// Optional id used to uniquely identify this experiment for Google web
// properties.
uint64 google_web_experiment_id = 3;
// Optional id used to allow this experiment to trigger experimental
// behavior on Google web properties.
uint64 google_web_trigger_experiment_id = 8;
// Optional visibility setting affecting |google_web_experiment_id| and
// |google_web_trigger_experiment_id| fields. See GoogleWebVisibility
// enum for details.
GoogleWebVisibility google_web_visibility = 16 [default = ANY];
// Optional id used to uniquely identify this experiment when activating
// integrations with the Android Google App.
// IMPORTANT: This field is only approved for integrations with the Android
// Google App and must receive a privacy review before extending to other
// apps.
uint64 google_app_experiment_id = 15;
// Specifies the feature association parameters for this experiment group.
//
// Next tag: 5
message FeatureAssociation {
// Optional list of features to enable when this experiment is selected.
// Command-line overrides take precedence over this setting. No feature
// listed here should exist in the |disable_feature| list.
repeated string enable_feature = 1;
// Optional list of features to disable when this experiment is selected.
// Command-line overrides take precedence over this setting. No feature
// listed here should exist in the |enable_feature| list.
repeated string disable_feature = 2;
// Similar to |forcing_flag|, this is an optional name of a feature which
// will cause this experiment to be activated, if that feature is enabled
// from the command-line. Experiment with this set are not eligible for
// selection via a random dice roll.
// Mutually exclusive with |forcing_flag|, |forcing_feature_off| or
// having a non-zero |probability_weight|.
string forcing_feature_on = 3;
// Similar to |forcing_flag|, this is an optional name of a feature which
// will cause this experiment to be activated, if that feature is disabled
// from the command-line. Experiment with this set are not eligible for
// selection via a random dice roll.
// Mutually exclusive with |forcing_flag|, |forcing_feature_on| or having
// a non-zero |probability_weight|.
string forcing_feature_off = 4;
}
FeatureAssociation feature_association = 12;
// Optional name of a Chrome flag that, when present, causes this experiment
// to be forced. If the forcing_flag field is set, users will not be
// assigned to this experiment unless that flag is present in Chrome's
// command line.
// Mutually exclusive with |forcing_feature_on|, |forcing_feature_off| or
// having a non-zero |probability_weight|.
string forcing_flag = 5;
// Parameter values for this experiment.
repeated Param param = 6;
enum Type {
// Regular experiment group. This is the default value and can be omitted.
NORMAL = 0;
// Changes to this experiment group are ignored for the purposes of
// kill-switch triggering. Included to allow the flexibility to not
// trigger this logic for specific cases (e.g. a group rename without
// any functionality changes).
IGNORE_CHANGE = 1;
// This is a kill-switch group that should be killed at "best effort"
// priority, e.g. with a hot dog menu badge. The experiment must have a
// probability_weight of 0.
KILL_BEST_EFFORT = 2;
// This is a kill-switch group that should be killed with "critical"
// priority. Depending on platform this may result in showing a
// non-dismissible restart prompt with a timer. This should only be used
// in very serious emergency circumstances. The experiment must have a
// probability_weight of 0.
KILL_CRITICAL = 3;
}
Type type = 7 [default = NORMAL];
// A UI string to override, and the new value to use.
message OverrideUIString {
// The first 32 bits of the MD5 hash digest of the resource name to
// override.
// e.g. Hash("IDS_BOOKMARK_BAR_UNDO")
fixed32 name_hash = 1;
// The new value of the string being overridden.
// e.g. "Undo"
string value = 2;
}
repeated OverrideUIString override_ui_string = 9;
}
// List of experiments in this study. This list should include the default /
// control experiment.
//
// For example, to specify that 99% of users get the default behavior, while
// 0.5% of users get experience "A" and 0.5% of users get experience "B",
// specify the values below.
// Ex: { "default": 990, "A": 5, "B": 5 }
repeated Experiment experiment = 9;
// Possible Chrome release channels.
// See: http://dev.chromium.org/getting-involved/dev-channel
enum Channel {
// UNKNOWN value is defined here for the benefit of code using this enum
// type, but is not actually meant to be encoded in the protobuf.
UNKNOWN = -1;
CANARY = 0;
DEV = 1;
BETA = 2;
STABLE = 3;
}
// Possible Chrome operating system platforms.
// These names must match those in tools/variations/fieldtrial_to_struct.py.
enum Platform {
PLATFORM_WINDOWS = 0;
PLATFORM_MAC = 1;
PLATFORM_LINUX = 2;
PLATFORM_CHROMEOS = 3;
PLATFORM_ANDROID = 4;
PLATFORM_IOS = 5;
PLATFORM_ANDROID_WEBVIEW = 6;
PLATFORM_FUCHSIA = 7;
PLATFORM_ANDROID_WEBLAYER = 8;
PLATFORM_CHROMEOS_LACROS = 9;
}
// Possible form factors Chrome is running on.
enum FormFactor {
// Chrome Desktop on Windows, Mac, Linux, or Chrome OS.
DESKTOP = 0;
// Phone-based mobile Chrome, e.g. an Android phone or iPhone.
PHONE = 1;
// Tablet-based mobile Chrome, e.g. an Android tablet or iPad.
TABLET = 2;
// Chrome OS running in single-app Kiosk mode.
KIOSK = 3;
// Chrome OS running on Meet Hardware devices e.g. Chromebox For Meetings.
MEET_DEVICE = 4;
// Chrome running on Android TV.
TV = 5;
// Chrome running on Android Auto.
AUTOMOTIVE = 6;
// Chrome running on Android Foldable.
FOLDABLE = 7;
}
// Possible browser process CPU architectures on which Chrome is running.
enum CpuArchitecture {
X86_64 = 0;
ARM64 = 1;
X86_32 = 2;
ARM32 = 3;
// A Mac-only value, indicating an x86-64 binary running on an arm64 host
// via "Rosetta 2" binary translation.
TRANSLATED_X86_64 = 4;
// A POSIX-only value, indicating an OpenPOWER host
PPC64 = 5;
LOONGARCH64 = 6;
}
// Enum to pass as optional bool.
enum OptionalBool {
// Neither True nor False. (For cases like missing / unset / default etc.)
OPTIONAL_BOOL_MISSING = 0;
// Explicit True.
OPTIONAL_BOOL_TRUE = 1;
// Explicit False.
OPTIONAL_BOOL_FALSE = 2;
}
// Possible states of the policy restriction filter.
enum PolicyRestriction {
// No restriction configs apply to clients that do not have a
// "ChromeVariations" policy set or if it is set to the variations enabled
// value.
NONE = 0;
// Critical studies apply to both clients that have all variations enabled
// or if the "ChromeVariations" policy is set to only allow critical
// variations.
CRITICAL = 1;
// Critical-only studies apply *only* to clients that have the
// "ChromeVariations" policy set to only allow critical variations.
CRITICAL_ONLY = 2;
}
// Filtering criteria specifying whether this study is applicable to a given
// Chrome instance.
//
// Next tag: 24
message Filter {
// The start date of the study in Unix time format. (Seconds since midnight
// January 1, 1970 UTC). See: http://en.wikipedia.org/wiki/Unix_time
// Ex: 1330893974 (corresponds to 2012-03-04 20:46:14Z)
int64 start_date = 1;
// The end date of the study in Unix time format. (Seconds since midnight
// January 1, 1970 UTC). See: http://en.wikipedia.org/wiki/Unix_time
// Ex: 1330893974 (corresponds to 2012-03-04 20:46:14Z)
// Mutually exclusive with expiry_date. The difference between end_date and
// expiry_date is that, when end_date is past, the field trial will not be
// created. When expiry_date is past, the trial is still created, but will
// be disabled, causing it to select its default group.
int64 end_date = 13;
// The minimum Chrome version for this study, allowing a trailing '*'
// character for pattern matching. Inclusive. (To check for a match, iterate
// over each component checking >= until a * or end of string is reached.)
// Optional - if not specified, there is no minimum version.
// Ex: "17.0.963.46", "17.0.963.*", "17.*"
string min_version = 2;
// The maximum Chrome version for this study; same formatting as
// |min_version| above. Inclusive. (To check for a match, iterate over each
// component checking <= until a * or end of string is reached.)
// Optional - if not specified, there is no maximum version.
// Ex: "19.*"
string max_version = 3;
// The minimum OS version for this study, allowing a trailing '*' character
// for pattern matching. Inclusive. (To check for a match, iterate over each
// component checking >= until a * or end of string is reached.) OS versions
// are sanitized into a list of digits separated by dots like so:
// Windows: "6.2.7601 SP1" --> "6.2.7601.1"
// Mac OS X: "10.11.2" --> "10.11.2"
// Linux: "4.13.0-32-generic" --> "4.13.0"
// Optional - if not specified, there is no minimum version.
string min_os_version = 16;
// The maximum OS version for this study, allowing a trailing '*' character
// for pattern matching. Inclusive. (To check for a match, iterate over each
// component checking <= until a * or end of string is reached.)
// Optional - if not specified, there is no minimum version.
// Ex: See |min_os_version| for details.
string max_os_version = 17;
// List of channels that will receive this study. If omitted, the study
// applies to all channels.
// Ex: [BETA, STABLE]
repeated Channel channel = 4 [features.repeated_field_encoding = EXPANDED];
// List of platforms that will receive this study. At least one platform
// is required. If omitted, the study won't apply to any platform.
// Ex: [PLATFORM_WINDOWS, PLATFORM_MAC]
repeated Platform platform = 5
[features.repeated_field_encoding = EXPANDED];
// List of locales that will receive this study. If omitted, the study
// applies to all locales, unless |exclude_locale| is specified. Mutually
// exclusive with |exclude_locale|.
// Ex: ["en-US", "en-GB"]
repeated string locale = 6;
// List of locales that will be excluded from this study. If omitted, the
// study applies to all locales unless |locale| is specified. Mutually
// exclusive with |locale|.
// Ex: ["en-US", "en-GB"]
repeated string exclude_locale = 12;
// List of form factors that will receive this study. If omitted, the study
// applies to all form factors, unless |exclude_form_factor| is specified.
// Mutually exclusive with |exclude_form_factor|.
// Ex: [PHONE, TABLET]
repeated FormFactor form_factor = 7
[features.repeated_field_encoding = EXPANDED];
// List of form factors that will be excluded from this study. If omitted,
// the study applies to all form factors unless |form_factor| is specified.
// Mutually exclusive with |form_factor|.
// Ex: [PHONE, TABLET]
repeated FormFactor exclude_form_factor = 14
[features.repeated_field_encoding = EXPANDED];
// List of hardware classes that will receive this study.
// This supports Chrome OS and as of M77, Android.
//
// Starting with Chrome M67, this does a case insensitive match on the same
// hardware class field that is reported to UMA in the SystemProfileProto's
// |hardware.hardware_class| field.
//
// Older versions did a case sensitive substring comparison, which was
// problematic for short hardware classes like "eve" that existed as
// substrings of other longer ones.
//
// If omitted, the study applies to all hardware classes unless
// |exclude_hardware_class| is specified. Mutually exclusive with
// |exclude_hardware_class|.
// Ex: ["veyron_minnie", "daisy"]
repeated string hardware_class = 8;
// List of hardware classes that will be excluded in this study.
// This supports Chrome OS and as of M77, Android.
//
// Starting with Chrome M67, this does a case insensitive match on the same
// hardware class field that is reported to UMA in the SystemProfileProto's
// |hardware.hardware_class| field.
//
// Older versions did a case sensitive substring comparison, which was
// problematic for short hardware classes like "eve" that existed as
// substrings of other longer ones.
//
// If omitted, the study applies to all hardware classes unless
// |hardware_class| is specified. Mutually exclusive with |hardware_class|.
// Ex: ["veyron_minnie", "daisy"]
repeated string exclude_hardware_class = 9;
// List of lowercase ISO 3166-1 alpha-2 country codes that will receive this
// study. If omitted, the study applies to all countries unless
// |exclude_country| is specified. Mutually exclusive with
// |exclude_country|.
// Ex: ["in", "us"]
repeated string country = 10;
// List of lowercase ISO 3166-1 alpha-2 country codes that will be excluded
// from this study. If omitted, the study applies to all countries unless
// |country| is specified. Mutually exclusive with |country|.
// Ex: ["in", "us"]
repeated string exclude_country = 11;
// Specifies whether the config should apply to low-end devices only. This
// is currently only supported on Android.
bool is_low_end_device = 15;
// Specifies whether the config should apply to enterprise or non-enterprise
// only. If omitted, the config applies to both groups.
// - On windows and mac, machines on a domain network are considered
// enterprise.
// - On chromeOS, registered mode determines enterprise status.
// - Android, iOS, and linux consider all clients as non-enterprise.
bool is_enterprise = 18;
// Specifies the restrictions applied by the "ChromeVariations" policy to
// the study. See the definition of the PolicyRestriction enum for details.
PolicyRestriction policy_restriction = 19 [default = NONE];
// Browser process CPU architectures that should receive or not receive this
// study. If |cpu_architecture| is omitted, the default behavior is for the
// study to apply to all CPU architectures not listed in
// |exclude_cpu_architecture|.
repeated CpuArchitecture cpu_architecture = 20
[features.repeated_field_encoding = EXPANDED];
repeated CpuArchitecture exclude_cpu_architecture = 21
[features.repeated_field_encoding = EXPANDED];
// Specifies that the config should apply only to clients where at least
// one of the signed in users is a member of at least one of the specified
// groups.
// The values are the gaia ID of the google group.
repeated int64 google_group = 22;
// Specifies that the config should apply only to clients where none
// of the signed in users are a member of any of the specified groups.
// The values are the gaia ID of the google group.
repeated int64 exclude_google_group = 23;
}
// Filtering criteria for this study. A study that is filtered out for a given
// client is equivalent to that study not being sent at all.
Filter filter = 10;
// Randomization seed to be used when |consistency| is set to PERMANENT. If
// not specified, randomization will be done using the trial name.
uint32 randomization_seed = 11;
// Specifies whether the study starts as active initially, or whether it
// requires the client to query its state before it is marked as active.
enum ActivationType {
// OPEN enum type causes unknown values get preserved in the field directly,
// as opposed to the field defaulting to the first value. We then validate
// this explicitly in processed_study.cc.
option features.enum_type = OPEN;
// The study will be activated when its state is queried by the client.
// This is recommended for most studies that include client code.
ACTIVATE_ON_QUERY = 0;
// The study will be automatically activated when it is created. This
// is recommended for studies that do not have any client logic.
ACTIVATE_ON_STARTUP = 1;
// The study is first activated when it is queried. On browser restarts, the
// study remains active unless the client would be assigned to a different
// group. This is recommended to avoid problems of differential triggering
// associated with ACTIVATE_ON_QUERY and for studying longer-term effects
// without activation on start up. Only valid for studies using PERMANENT
// consistency.
STICKY_AFTER_QUERY = 2;
}
// Activation type for this study. Defaults to ACTIVATE_ON_QUERY if omitted.
ActivationType activation_type = 12;
}
|