File: contact_info_specifics.proto

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 (253 lines) | stat: -rw-r--r-- 10,732 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
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
// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// If you change or add any fields in this file, update proto_visitors.h and
// potentially proto_enum_conversions.{h, cc}.

syntax = "proto2";

option java_multiple_files = true;
option java_package = "org.chromium.components.sync.protocol";

option optimize_for = LITE_RUNTIME;

package sync_pb;

message ContactInfoSpecifics {
  // Used to distinguish whether the address is the dedicated Home or Work
  // address of the user's account.
  // This translates into `AutofillProfile::RecordType::kAccount*`.
  enum AddressType {
    REGULAR = 0;
    HOME = 1;
    WORK = 2;
  }

  // Represents the validation status of a stored value.
  enum VerificationStatus {
    // No verification status assigned.
    VERIFICATION_STATUS_UNSPECIFIED = 0;
    // The value token was parsed from a parent token.
    // For example, the first name was derived by splitting a full name into
    // its components.
    PARSED = 1;
    // Value was built from its subcomponents.
    // For example, the full name was built from the first, middle and last
    // name.
    FORMATTED = 2;
    // The value was observed in a form transmission.
    // For example, the user filled a form that contained at NAME_FULL field.
    // The value of NAME_FULL will be stored as OBSERVED.
    OBSERVED = 3;
    // The user used the settings UI to verify and store this token.
    // This is currently only applicable to the full name, since users cannot
    // edit individual components of their name.
    USER_VERIFIED = 4;
    // The token was parsed remotely.
    SERVER_PARSED = 5;
  }

  message Observation {
    // An `autofill::ProfileTokenQuality::ObservationType`. Represented as a
    // uint32 to retain future enum values (since this is proto2).
    // The `ObservationType`'s underlying type is uint8_t, but this is not
    // supported by protos. Since the uint32 Proto type uses variable-length
    // encoding, uint32 has a similar size as a single element byte[].
    optional uint32 type = 1;
    // The `autofill::ProfileTokenQuality::FormSignatureHash` has type uint8_t.
    // Like for `type`, this should have the (non-existing) data type uint8.
    optional uint32 form_hash = 2;
  }

  // Metadata that is attached to every token type.
  message TokenMetadata {
    optional VerificationStatus status = 1;
    repeated Observation observations = 2;
    // Stores a hash of the token value that this metadata is associated with.
    // This is used by Autofill to detect changes of the token value by external
    // integrators.
    optional uint32 value_hash = 3;
  }

  // A token with a string interpretation of the value.
  message StringToken {
    optional string value = 1;
    optional TokenMetadata metadata = 2;
  }

  // A globally unique, immutable UUID represented in lowercase.
  optional string guid = 1;
  reserved 2;
  reserved "source";
  optional AddressType address_type = 56 [default = REGULAR];

  // The number of time this profile has been used.
  optional int64 use_count = 3;

  // The last times this profile was used. use_date.. is the last use date of
  // the profile, use_date2.. the second last use date, etc. If a profile hasn't
  // been used at least that many times, the field is unset.
  optional int64 use_date_unix_epoch_seconds = 4;
  optional int64 use_date2_unix_epoch_seconds = 54;
  optional int64 use_date3_unix_epoch_seconds = 55;

  // The last time the profile was modified.
  optional int64 date_modified_unix_epoch_seconds = 37;

  // The BCP 47 language code used to format the address for display.
  optional string language_code = 38;

  // A label intended to be chosen by the user. This was however never
  // implemented and is currently unused.
  optional string profile_label = 5;

  // Tracks the application that initially created the profile. The integer
  // represents a value in the server-side enum `BillableService`. A value of
  // 70073 represents Chrome (enum value BILLABLE_SERVICE_CHROME_PAYMENTS).
  optional int32 initial_creator_id = 39;
  // Tracks the application that applied the last modification to the
  // non-metadata content of the profile. It represents a value in the same
  // `BillableService` enum.
  // All StringTokens, and the `profile_label` are considered non-metadata.
  optional int32 last_modifier_id = 40;

  // Used to hide account addresses in Chrome.
  // Chrome will set this value to true if the address should be filtered out
  // on the server side and not passed to Chrome again.
  // If Chrome set this value to false or if the value is not set, the address
  // will be passed to Chrome.
  optional bool invisible_in_autofill = 62;

  // Contact info name fields.
  optional StringToken name_first = 7;
  optional StringToken name_middle = 8;
  optional StringToken name_last = 9;

  // Prefix of the last name, e.g., "von" in "von Neumann".
  optional StringToken name_last_prefix = 60;

  // Core of the last name, excluding prefixes.
  optional StringToken name_last_core = 61;

  // Sometimes the last name is composed of two names as it is common for
  // Hispanic/Latinx names. In the unstructured representation of the last name,
  // there may be even a conjunction between the first and the second last
  // name. For example, the more-complete version of Pablo Picasso's surname is
  // "Ruiz y Picasso" containing a first last name, a conjunction (the y) and a
  // second last name.
  optional StringToken name_last_first = 10;
  optional StringToken name_last_conjunction = 11;
  optional StringToken name_last_second = 12;
  optional StringToken name_full = 13;

  reserved 14;
  reserved "name_full_with_honorific";

  // Contact info alternative name fields (e.g. phonetic names in Japan).
  optional StringToken alternative_full_name = 57;
  optional StringToken alternative_given_name = 58;
  optional StringToken alternative_family_name = 59;

  // Contact info additional fields.
  optional StringToken email_address = 15;
  optional StringToken company_name = 16;

  // Address fields: These are user-provided values with no particular
  // guarantees about their format.
  optional StringToken address_city = 17;
  optional StringToken address_state = 18;
  optional StringToken address_zip = 19;
  optional StringToken address_country = 20;
  optional StringToken address_admin_level_2 = 43;

  // Additional address fields for i18n.
  // Includes all of the lines of a street address, including newlines, e.g.
  //   123 Main Street,
  //   Apt. #42
  optional StringToken address_street_address = 21;
  // A sorting code is similar to a postal code. However, whereas a postal code
  // normally refers to a single geographical location, a sorting code often
  // does not. Instead, a sorting code is assigned to an organization, which
  // might be geographically distributed. The most prominent example of a
  // sorting code system is CEDEX in France.
  optional StringToken address_sorting_code = 22;
  // A dependent locality is a subunit of a locality, where a "locality" is
  // roughly equivalent to a city. Examples of dependent localities include
  // inner-city districts and suburbs.
  optional StringToken address_dependent_locality = 23;
  reserved 24;
  reserved "address_language_code";
  // The street name of the address, without a house number.
  optional StringToken address_thoroughfare_name = 25;
  // The house number, which may be alphanumeric.
  optional StringToken address_thoroughfare_number = 26;
  // Deprecated in M118.
  reserved 27;
  reserved "address_dependent_thoroughfare_name";
  reserved 28;
  reserved "address_thoroughfare_and_dependent_thoroughfare_name";
  reserved 29;
  reserved "address_premise_name";
  // Contains the floor, staircase or apartment number within a building.
  optional StringToken address_subpremise_name = 30;
  // All the information related to the apartment. Normally a combination of the
  // apartment type (address_apt_type) and number (address_apt_num).
  // E.g. "Apt 5".
  optional StringToken address_apt = 50;
  // The apartment number within a building.
  optional StringToken address_apt_num = 31;
  // Information describing the type of apartment (e.g. Apt, Apartamento, Sala,
  // Departamento).
  optional StringToken address_apt_type = 51;
  // The floor number within a building.
  optional StringToken address_floor = 32;
  // Contains both the street and house number.
  optional StringToken address_street_location = 44;

  optional StringToken address_landmark = 41;
  optional StringToken address_overflow = 45;
  // Indicates that the address is at the intersection between two streets.
  // It is normally a combination of between_streets_1 and _2. This is a common
  // way of writing addresses in Mexico.
  optional StringToken address_between_streets = 42;
  // The meaning of the field is similar to address_between_streets. The
  // type should be used for "Entre calle 1" in MX addresses which also
  // contain the "Entre calle 2" field.
  optional StringToken address_between_streets_1 = 46;
  // The meaning of the field is similar to address_between_streets. The
  // type should be used for "Entre calle 2" in MX addresses which also
  // contain the "Entre calle 1" field.
  optional StringToken address_between_streets_2 = 47;
  // Combination of types address_between_streets or address_landmark. Note that
  // some address forms require the combination of both in a single field as
  // opposed to each one separately.
  optional StringToken address_between_streets_or_landmark = 48;
  // Combination of types address_overflow and address_landmark. Note that some
  // address forms require the combination of both in a single field as opposed
  // to each one separately.
  optional StringToken address_overflow_and_landmark = 49;
  // Combination of types address_street_location and
  // address_dependent_locality. Note that some address forms require the
  // combination of both in a single field as opposed to each one separately.
  optional StringToken address_street_location_and_locality = 52;
  // Combination of types address_thoroughfare_number and address_apt. Note that
  // some address forms require the combination of both in a single field as
  // opposed to each one separately.
  optional StringToken address_thoroughfare_number_and_apt = 53;

  // Phone.
  optional StringToken phone_home_whole_number = 33;

  // Removed in M123.
  reserved 34;
  reserved "birthdate_day";
  reserved 35;
  reserved "birthdate_month";
  reserved 36;
  reserved "birthdate_year";

  // Removed in M122.
  reserved 6;
  reserved "name_honorific";
}