| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 syntax = "proto2"; | 5 syntax = "proto2"; |
| 6 | 6 |
| 7 option optimize_for = LITE_RUNTIME; | 7 option optimize_for = LITE_RUNTIME; |
| 8 | 8 |
| 9 package variations; | 9 package variations; |
| 10 | 10 |
| 11 // This defines the Protocol Buffer representation of a Chrome Variations study | 11 // This defines the Protocol Buffer representation of a Chrome Variations study |
| 12 // as sent to clients of the Variations server. | 12 // as sent to clients of the Variations server. |
| 13 // | 13 // |
| 14 // Next tag: 13 | 14 // Next tag: 13 |
| 15 message Study { | 15 message Study { |
| 16 // The name of the study. Should not contain spaces or special characters. | 16 // The name of the study. Should not contain spaces or special characters. |
| 17 // Ex: "my_study" | 17 // Ex: "my_study" |
| 18 required string name = 1; | 18 required string name = 1; |
| 19 | 19 |
| 20 // DEPRECATED: Prefer end_date instead. | |
| 21 // The expiry date of the study in Unix time format. (Seconds since midnight | 20 // The expiry date of the study in Unix time format. (Seconds since midnight |
| 22 // January 1, 1970 UTC). See: http://en.wikipedia.org/wiki/Unix_time | 21 // January 1, 1970 UTC). See: http://en.wikipedia.org/wiki/Unix_time |
| 23 // | 22 // |
| 24 // A study that has expired will be disabled, and users will be assigned | 23 // A study that has expired will be disabled, and users will be assigned |
| 25 // groups based on the default_experiment_name. This will take precedence over | 24 // groups based on the default_experiment_name. This will take precedence over |
| 26 // a corresponding hardcoded field trial in the client. | 25 // a corresponding hardcoded field trial in the client. |
| 27 // | 26 // |
| 28 // Ex: 1330893974 (corresponds to 2012-03-04 20:46:14Z) | 27 // Ex: 1330893974 (corresponds to 2012-03-04 20:46:14Z) |
| 29 optional int64 expiry_date = 3; | 28 optional int64 expiry_date = 3; |
| 30 | 29 |
| 31 // Consistency setting for a study. | 30 // Consistency setting for a study. |
| 32 enum Consistency { | 31 enum Consistency { |
| 33 SESSION = 0; // Can't change within a session. | 32 SESSION = 0; // Can't change within a session. |
| 34 PERMANENT = 1; // Can't change for a given user. | 33 PERMANENT = 1; // Can't change for a given user. |
| 35 } | 34 } |
| 36 | 35 |
| 37 // Consistency setting for this study. Optional - defaults to SESSION. | 36 // Consistency setting for this study. Optional - defaults to SESSION. |
| 38 // Ex: PERMANENT | 37 // Ex: PERMANENT |
| 39 optional Consistency consistency = 7 [default = SESSION]; | 38 optional Consistency consistency = 7 [default = SESSION]; |
| 40 | 39 |
| 41 // Name of the experiment that gets the default experience. This experiment | 40 // Name of the experiment that gets the default experience. This experiment |
| 42 // must be included in the list below. If not specified, a generic default | 41 // must be included in the list below. |
| 43 // experiment name is used. | |
| 44 // Ex: "default" | 42 // Ex: "default" |
| 45 optional string default_experiment_name = 8; | 43 optional string default_experiment_name = 8; |
| 46 | 44 |
| 47 // An experiment within the study. | 45 // An experiment within the study. |
| 48 // | 46 // |
| 49 // Next tag: 14 | 47 // Next tag: 14 |
| 50 message Experiment { | 48 message Experiment { |
| 51 // A named parameter value for this experiment. | 49 // A named parameter value for this experiment. |
| 52 // | 50 // |
| 53 // Next tag: 3 | 51 // Next tag: 3 |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 // Possible form factors Chrome is running on. | 191 // Possible form factors Chrome is running on. |
| 194 enum FormFactor { | 192 enum FormFactor { |
| 195 DESKTOP = 0; | 193 DESKTOP = 0; |
| 196 PHONE = 1; | 194 PHONE = 1; |
| 197 TABLET = 2; | 195 TABLET = 2; |
| 198 } | 196 } |
| 199 | 197 |
| 200 // Filtering criteria specifying whether this study is applicable to a given | 198 // Filtering criteria specifying whether this study is applicable to a given |
| 201 // Chrome instance. | 199 // Chrome instance. |
| 202 // | 200 // |
| 203 // Next tag: 14 | 201 // Next tag: 13 |
| 204 message Filter { | 202 message Filter { |
| 205 // The start date of the study in Unix time format. (Seconds since midnight | 203 // The start date of the study in Unix time format. (Seconds since midnight |
| 206 // January 1, 1970 UTC). See: http://en.wikipedia.org/wiki/Unix_time | 204 // January 1, 1970 UTC). See: http://en.wikipedia.org/wiki/Unix_time |
| 207 // Ex: 1330893974 (corresponds to 2012-03-04 20:46:14Z) | 205 // Ex: 1330893974 (corresponds to 2012-03-04 20:46:14Z) |
| 208 optional int64 start_date = 1; | 206 optional int64 start_date = 1; |
| 209 | 207 |
| 210 // The end date of the study in Unix time format. (Seconds since midnight | |
| 211 // January 1, 1970 UTC). See: http://en.wikipedia.org/wiki/Unix_time | |
| 212 // Ex: 1330893974 (corresponds to 2012-03-04 20:46:14Z) | |
| 213 // Mutually exclusive with expiry_date. The difference between end_date and | |
| 214 // expiry_date is that, when end_date is past, the field trial will not be | |
| 215 // created. When expiry_date is past, the trial is still created, but will | |
| 216 // be disabled, causing it to select its default group. | |
| 217 optional int64 end_date = 13; | |
| 218 | |
| 219 // The minimum Chrome version for this study, allowing a trailing '*' | 208 // The minimum Chrome version for this study, allowing a trailing '*' |
| 220 // character for pattern matching. Inclusive. (To check for a match, iterate | 209 // character for pattern matching. Inclusive. (To check for a match, iterate |
| 221 // over each component checking >= until a * or end of string is reached.) | 210 // over each component checking >= until a * or end of string is reached.) |
| 222 // Optional - if not specified, there is no minimum version. | 211 // Optional - if not specified, there is no minimum version. |
| 223 // Ex: "17.0.963.46", "17.0.963.*", "17.*" | 212 // Ex: "17.0.963.46", "17.0.963.*", "17.*" |
| 224 optional string min_version = 2; | 213 optional string min_version = 2; |
| 225 | 214 |
| 226 // The maximum Chrome version for this study; same formatting as | 215 // The maximum Chrome version for this study; same formatting as |
| 227 // |min_version| above. Inclusive. (To check for a match, iterate over each | 216 // |min_version| above. Inclusive. (To check for a match, iterate over each |
| 228 // component checking <= until a * or end of string is reached.) | 217 // component checking <= until a * or end of string is reached.) |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 // This is recommended for most studies that include client code. | 293 // This is recommended for most studies that include client code. |
| 305 ACTIVATION_EXPLICIT = 0; | 294 ACTIVATION_EXPLICIT = 0; |
| 306 // The study will be automatically activated when it is created. This | 295 // The study will be automatically activated when it is created. This |
| 307 // is recommended for studies that do not have any client logic. | 296 // is recommended for studies that do not have any client logic. |
| 308 ACTIVATION_AUTO = 1; | 297 ACTIVATION_AUTO = 1; |
| 309 } | 298 } |
| 310 | 299 |
| 311 // Activation type for this study. Defaults to ACTIVATION_EXPLICIT if omitted. | 300 // Activation type for this study. Defaults to ACTIVATION_EXPLICIT if omitted. |
| 312 optional ActivationType activation_type = 12; | 301 optional ActivationType activation_type = 12; |
| 313 } | 302 } |
| OLD | NEW |