Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Side by Side Diff: components/variations/proto/study.proto

Issue 2612243003: Supporting study definitions without default groups and end_date filtering. (Closed)
Patch Set: removing static initializer Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/variations/processed_study.cc ('k') | components/variations/study_filtering.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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.
20 // The expiry date of the study in Unix time format. (Seconds since midnight 21 // The expiry date of the study in Unix time format. (Seconds since midnight
21 // January 1, 1970 UTC). See: http://en.wikipedia.org/wiki/Unix_time 22 // January 1, 1970 UTC). See: http://en.wikipedia.org/wiki/Unix_time
22 // 23 //
23 // A study that has expired will be disabled, and users will be assigned 24 // A study that has expired will be disabled, and users will be assigned
24 // groups based on the default_experiment_name. This will take precedence over 25 // groups based on the default_experiment_name. This will take precedence over
25 // a corresponding hardcoded field trial in the client. 26 // a corresponding hardcoded field trial in the client.
26 // 27 //
27 // Ex: 1330893974 (corresponds to 2012-03-04 20:46:14Z) 28 // Ex: 1330893974 (corresponds to 2012-03-04 20:46:14Z)
28 optional int64 expiry_date = 3; 29 optional int64 expiry_date = 3;
29 30
30 // Consistency setting for a study. 31 // Consistency setting for a study.
31 enum Consistency { 32 enum Consistency {
32 SESSION = 0; // Can't change within a session. 33 SESSION = 0; // Can't change within a session.
33 PERMANENT = 1; // Can't change for a given user. 34 PERMANENT = 1; // Can't change for a given user.
34 } 35 }
35 36
36 // Consistency setting for this study. Optional - defaults to SESSION. 37 // Consistency setting for this study. Optional - defaults to SESSION.
37 // Ex: PERMANENT 38 // Ex: PERMANENT
38 optional Consistency consistency = 7 [default = SESSION]; 39 optional Consistency consistency = 7 [default = SESSION];
39 40
40 // Name of the experiment that gets the default experience. This experiment 41 // Name of the experiment that gets the default experience. This experiment
41 // must be included in the list below. 42 // must be included in the list below. If not specified, a generic default
43 // experiment name is used.
42 // Ex: "default" 44 // Ex: "default"
43 optional string default_experiment_name = 8; 45 optional string default_experiment_name = 8;
44 46
45 // An experiment within the study. 47 // An experiment within the study.
46 // 48 //
47 // Next tag: 14 49 // Next tag: 14
48 message Experiment { 50 message Experiment {
49 // A named parameter value for this experiment. 51 // A named parameter value for this experiment.
50 // 52 //
51 // Next tag: 3 53 // Next tag: 3
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 // Possible form factors Chrome is running on. 193 // Possible form factors Chrome is running on.
192 enum FormFactor { 194 enum FormFactor {
193 DESKTOP = 0; 195 DESKTOP = 0;
194 PHONE = 1; 196 PHONE = 1;
195 TABLET = 2; 197 TABLET = 2;
196 } 198 }
197 199
198 // Filtering criteria specifying whether this study is applicable to a given 200 // Filtering criteria specifying whether this study is applicable to a given
199 // Chrome instance. 201 // Chrome instance.
200 // 202 //
201 // Next tag: 13 203 // Next tag: 14
202 message Filter { 204 message Filter {
203 // The start date of the study in Unix time format. (Seconds since midnight 205 // The start date of the study in Unix time format. (Seconds since midnight
204 // January 1, 1970 UTC). See: http://en.wikipedia.org/wiki/Unix_time 206 // January 1, 1970 UTC). See: http://en.wikipedia.org/wiki/Unix_time
205 // Ex: 1330893974 (corresponds to 2012-03-04 20:46:14Z) 207 // Ex: 1330893974 (corresponds to 2012-03-04 20:46:14Z)
206 optional int64 start_date = 1; 208 optional int64 start_date = 1;
207 209
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
208 // The minimum Chrome version for this study, allowing a trailing '*' 219 // The minimum Chrome version for this study, allowing a trailing '*'
209 // character for pattern matching. Inclusive. (To check for a match, iterate 220 // character for pattern matching. Inclusive. (To check for a match, iterate
210 // over each component checking >= until a * or end of string is reached.) 221 // over each component checking >= until a * or end of string is reached.)
211 // Optional - if not specified, there is no minimum version. 222 // Optional - if not specified, there is no minimum version.
212 // Ex: "17.0.963.46", "17.0.963.*", "17.*" 223 // Ex: "17.0.963.46", "17.0.963.*", "17.*"
213 optional string min_version = 2; 224 optional string min_version = 2;
214 225
215 // The maximum Chrome version for this study; same formatting as 226 // The maximum Chrome version for this study; same formatting as
216 // |min_version| above. Inclusive. (To check for a match, iterate over each 227 // |min_version| above. Inclusive. (To check for a match, iterate over each
217 // component checking <= until a * or end of string is reached.) 228 // component checking <= until a * or end of string is reached.)
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 // This is recommended for most studies that include client code. 304 // This is recommended for most studies that include client code.
294 ACTIVATION_EXPLICIT = 0; 305 ACTIVATION_EXPLICIT = 0;
295 // The study will be automatically activated when it is created. This 306 // The study will be automatically activated when it is created. This
296 // is recommended for studies that do not have any client logic. 307 // is recommended for studies that do not have any client logic.
297 ACTIVATION_AUTO = 1; 308 ACTIVATION_AUTO = 1;
298 } 309 }
299 310
300 // Activation type for this study. Defaults to ACTIVATION_EXPLICIT if omitted. 311 // Activation type for this study. Defaults to ACTIVATION_EXPLICIT if omitted.
301 optional ActivationType activation_type = 12; 312 optional ActivationType activation_type = 12;
302 } 313 }
OLDNEW
« no previous file with comments | « components/variations/processed_study.cc ('k') | components/variations/study_filtering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698