File: device_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 (226 lines) | stat: -rw-r--r-- 8,927 bytes parent folder | download | duplicates (3)
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
// 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.
//
// Sync protocol datatype extension for nigori keys.

// 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;

import "components/sync/protocol/sync_enums.proto";

// Information about a device that is running a sync-enabled Chrome browser.  We
// are mapping the per-client cache guid to more specific information about the
// device.
message DeviceInfoSpecifics {
  // The cache_guid created to identify a sync client on this device.
  optional string cache_guid = 1;

  // A non-unique but human readable name to describe this client.
  optional string client_name = 2;

  // The platform of the device.
  // Deprecated in M110, but still populated for backwards compatibility.
  // Replaced by os_type + device_form_factor.
  optional SyncEnums.DeviceType device_type = 3 [deprecated = true];

  // The UserAgent used when contacting the Chrome Sync server.
  // Only present when talking to the HTTP server.
  optional string sync_user_agent = 4;

  // The Chrome instance's version.  Updated (if necessary) on every startup.
  // DEPRECATED in M92. Still populated for backward compatibility.
  optional string chrome_version = 5 [deprecated = true];

  // Last time when pre-sync data on the device was saved. The device can be
  // restored to state back to this time. In millisecond since UNIX epoch.
  // DEPRECATED in M50.
  optional int64 deprecated_backup_timestamp = 6 [deprecated = true];

  // Device_id that is stable until user signs out. This device_id is used for
  // annotating login scoped refresh token. Present only for Chrome Clients.
  optional string signin_scoped_device_id = 7;

  // This field is updated to be the current time periodically, and is also set
  // to the current time whenever another field changes. By examining the
  // difference between this field and the current time, it should be possible
  // to reason about the inactivity of any device that was syncing at one time.
  optional int64 last_updated_timestamp = 8;

  // Device info fields that are specific to a feature. This is information that
  // can not be derived from the other fields in the proto and are not general
  // enough to be used by another feature.
  optional FeatureSpecificFields feature_fields = 9;

  // Device specific information for Sharing feature.
  optional SharingSpecificFields sharing_fields = 10;

  // Model of device.
  optional string model = 11;

  // Name of device manufacturer.
  optional string manufacturer = 12;

  // The interval in minutes with which `last_updated_timestamp` is updated to
  // the sync servers if online and while sync is actively running (e.g.
  // excludes backgrounded apps on Android). Introduced in M81. The legacy
  // default was 1 day.
  optional int32 pulse_interval_in_minutes = 13;

  // Device specific information for Sync invalidations.
  optional InvalidationSpecificFields invalidation_fields = 14;

  // Information for contacting this device in order to perform security key
  // operations.
  optional PhoneAsASecurityKeySpecificFields paask_fields = 15;

  // Unique hardware identifier string which details the HW combination of
  // a ChromeOS device. This field will be empty on other OS devices.
  optional string full_hardware_class = 16;

  // Version information to pin-point which client implementation this is.
  oneof client_version_info {
    ChromeVersionInfo chrome_version_info = 17;
    GooglePlayServicesVersionInfo google_play_services_version_info = 18;
  }

  // The OS type the device.
  optional SyncEnums.OsType os_type = 19;

  // The form factor of the device.
  optional SyncEnums.DeviceFormFactor device_form_factor = 20;
}

// Feature specific information about the device that is running a sync-enabled
// Chrome browser. Adding to this proto is discouraged and should only be added
// when the information can not be derived more generally.
message FeatureSpecificFields {
  // Tracks whether the SendTabToSelf feature is enabled on the device. For this
  // to be true, two things must be true: (1) The receiving side of the feature
  // must be enabled on the device (2) The user has enabled sync for this
  // feature.
  optional bool send_tab_to_self_receiving_enabled = 1;

  // Tracks which type of Send Tab To Self message(s) can be sent to the
  // receiving device.
  // If not set, the in-app message type will be assumed.
  optional SyncEnums.SendTabReceivingType send_tab_to_self_receiving_type = 2;

  // Tracks the last time this device signed-in with the floating workspace
  // feature enabled. As of 07/2024, this feature is only supported on ChromeOS.
  optional int64 floating_workspace_last_signin_time_windows_epoch_micros = 3;
}

// Device specific information for Sharing feature. Used to send end-to-end
// encrypted message through FCM or unencrypted message through Chime to other
// devices.
message SharingSpecificFields {
  reserved 1, 2, 3;
  reserved "vapid_fcm_token", "vapid_p256dh", "vapid_auth_secret";

  // Enum defining available Sharing features.
  enum EnabledFeatures {
    reserved 5;
    reserved "PEER_CONNECTION";
    reserved 1;
    reserved "CLICK_TO_CALL_VAPID";
    reserved 2;
    reserved "SHARED_CLIPBOARD_VAPID";

    UNKNOWN = 0;
    SMS_FETCHER = 3;
    REMOTE_COPY = 4;
    DISCOVERY = 6;
    // Supports Click to Call via sender ID.
    CLICK_TO_CALL_V2 = 7;
    // Supports Shared Clipboard via sender ID.
    SHARED_CLIPBOARD_V2 = 8;
    // Supports optimization guide push notification.
    OPTIMIZATION_GUIDE_PUSH_NOTIFICATION = 9;
  }

  // A list of enabled Sharing features.
  repeated EnabledFeatures enabled_features = 4;

  // Deprecated. Use sender_id_fcm_token_v2 for new clients.
  optional string sender_id_fcm_token_deprecated = 5 [deprecated = true];

  // Deprecated. Use sender_id_p256dh_v2 for new clients.
  optional bytes sender_id_p256dh_deprecated = 6 [deprecated = true];

  // Deprecated. Use sender_id_auth_secret_v2 for new clients.
  optional bytes sender_id_auth_secret_deprecated = 7 [deprecated = true];

  // FCM registration token of device subscribed using Sharing sender ID.
  optional string sender_id_fcm_token_v2 = 8;

  // Public key for message encryption [RFC8291] using Sharing sender ID.
  optional bytes sender_id_p256dh_v2 = 9;

  // Auth secret for message encryption [RFC8291] using Sharing sender ID.
  optional bytes sender_id_auth_secret_v2 = 10;

  // Identifier used to send notifications to a specific device in Chime. Added
  // in M128.
  optional string chime_representative_target_id = 11;
}

// Device specific information telling how to send invalidations to this device.
message InvalidationSpecificFields {
  // FCM registration token of device (using Sync sender ID).
  optional string instance_id_token = 1;

  // This device wants to receive only invalidations which are related to these
  // types. The legitimate values of this field correspond to the protobuf field
  // numbers of all EntitySpecifics fields supported by the server (see
  // components/sync/protocol/sync.proto).
  repeated int32 interested_data_type_ids = 2;
}

message PhoneAsASecurityKeySpecificFields {
  // The encoded tunnel server in the same format as in the BLE advert. See
  // device::cablev2::tunnelserver::DecodeDomain. (Actually a uint16 but
  // proto doesn't have that as a type.)
  optional uint32 tunnel_server_domain = 1;

  // An FCM token that can be presented to the tunnel server to contact this
  // device.
  optional bytes contact_id = 2;

  // A shared secret key, used to enable communication across devices via
  // unauthenticated channels. Knowledge of this secret acts as proof that the
  // remote end is authorized to talk to the device publishing this secret.
  optional bytes secret = 3;

  // An id that identifies `secret`. This, and `secret`, will be rotated and
  // the ID allows this device to know which `secret` the counterparty is
  // using.
  optional fixed32 id = 4;

  // A P-256, X9.62-encoded public key for this device. Specific to the Chrome
  // instance.
  optional bytes peer_public_key_x962 = 5;

  // The credential ID for use when signing into accounts.google.com. This
  // credential ID isn't published as a WebauthnCredentialSpecifics, unlike
  // other passkeys, because it's auto-generated.
  optional bytes google_credential_id = 6;
}

message ChromeVersionInfo {
  // Version number as per https://www.chromium.org/developers/version-numbers.
  optional string version_number = 1;
}

message GooglePlayServicesVersionInfo {
  optional string apk_version_name = 1;
}