xref: /aosp_15_r20/external/cronet/third_party/metrics_proto/user_demographics.proto (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1// Copyright 2019 The Chromium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5syntax = "proto2";
6
7option optimize_for = LITE_RUNTIME;
8option java_package = "org.chromium.components.metrics";
9
10option java_outer_classname = "UserDemographicsProtos";
11
12package metrics;
13
14// Limited demographics information about the user.
15//
16// This data is drawn from the signed-in user's GAIA id and is provided to
17// Chrome via syncable priority pref.
18//
19// Next tag: 3
20message UserDemographicsProto {
21  // The (noisy) year of birth specified by the user. The value reported in this
22  // field cannot safely be interpreted as the true value for the user; it may
23  // be offset by a randomly chosen number of years from [-2, +2].
24  optional int32 birth_year = 1;
25
26  // The supported gender identifiers. These values correspond to those offered
27  // in the "Gender" section of the Google Account settings. Note that these
28  // values deliberately do not address the rich spectrum of possible gender
29  // identities with high granularity because we do not want these values to be
30  // highly identifying.
31  //
32  // Values from this enum are both sent to Chrome via Chrome Sync, and
33  // selectively forwarded from Chrome to UMA logs.
34  enum Gender {
35    // The default value for clients that do not have any gender information.
36    GENDER_UNKNOWN = 0;
37    // The user specified that they prefer to be referred to as male.
38    GENDER_MALE = 1;
39    // The user specified that they prefer to be referred to as female.
40    GENDER_FEMALE = 2;
41    // The user specified that they prefer not to disclose a gender or the user
42    // provided a custom gender identifier. This value may be synced to Chrome,
43    // but it is not transmitted to UMA because the population size is
44    // relatively small vs MALE/FEMALE and thus may be highly identifying.
45    // Instead, these users will not submit any demographics, blending them into
46    // the GENDER_UNKNOWN group (which is large).
47    GENDER_CUSTOM_OR_OTHER = 3;
48  }
49
50  // The gender specified by the user. If the user's gender is unknown or non-
51  // binary, this field will be omitted, corresponding to a default
52  // value of GENDER_UNKNOWN.
53  optional Gender gender = 2;
54}
55