device_info_specifics.proto 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  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
  3. // found in the LICENSE file.
  4. //
  5. // Sync protocol datatype extension for nigori keys.
  6. // If you change or add any fields in this file, update proto_visitors.h and
  7. // potentially proto_enum_conversions.{h, cc}.
  8. syntax = "proto2";
  9. option java_multiple_files = true;
  10. option java_package = "org.chromium.components.sync.protocol";
  11. option optimize_for = LITE_RUNTIME;
  12. package sync_pb;
  13. import "components/sync/protocol/sync_enums.proto";
  14. // Information about a device that is running a sync-enabled Chrome browser. We
  15. // are mapping the per-client cache guid to more specific information about the
  16. // device.
  17. message DeviceInfoSpecifics {
  18. // The cache_guid created to identify a sync client on this device.
  19. optional string cache_guid = 1;
  20. // A non-unique but human readable name to describe this client.
  21. optional string client_name = 2;
  22. // The platform of the device.
  23. optional SyncEnums.DeviceType device_type = 3;
  24. // The UserAgent used when contacting the Chrome Sync server.
  25. // Only present when talking to the HTTP server.
  26. optional string sync_user_agent = 4;
  27. // The Chrome instance's version. Updated (if necessary) on every startup.
  28. // DEPRECATED in M92. Still populated for backward compatibility.
  29. optional string chrome_version = 5 [deprecated = true];
  30. // Last time when pre-sync data on the device was saved. The device can be
  31. // restored to state back to this time. In millisecond since UNIX epoch.
  32. // DEPRECATED in M50.
  33. optional int64 deprecated_backup_timestamp = 6 [deprecated = true];
  34. // Device_id that is stable until user signs out. This device_id is used for
  35. // annotating login scoped refresh token. Present only for Chrome Clients.
  36. optional string signin_scoped_device_id = 7;
  37. // This field is updated to be the current time periodically, and is also set
  38. // to the current time whenever another field changes. By examining the
  39. // difference between this field and the current time, it should be possible
  40. // to reason about the inactivity of any device that was syncing at one time.
  41. optional int64 last_updated_timestamp = 8;
  42. // Device info fields that are specific to a feature. This is information that
  43. // can not be derived from the other fields in the proto and are not general
  44. // enough to be used by another feature.
  45. optional FeatureSpecificFields feature_fields = 9;
  46. // Device specific information for Sharing feature.
  47. optional SharingSpecificFields sharing_fields = 10;
  48. // Model of device.
  49. optional string model = 11;
  50. // Name of device manufacturer.
  51. optional string manufacturer = 12;
  52. // The interval in minutes with which |last_updated_timestamp| is updated to
  53. // the sync servers if online and while sync is actively running (e.g.
  54. // excludes backgrounded apps on Android). Introduced in M81. The legacy
  55. // default was 1 day.
  56. optional int32 pulse_interval_in_minutes = 13;
  57. // Device specific information for Sync invalidations.
  58. optional InvalidationSpecificFields invalidation_fields = 14;
  59. // Information for contacting this device in order to perform security key
  60. // operations.
  61. optional PhoneAsASecurityKeySpecificFields paask_fields = 15;
  62. // Unique hardware identifier string which details the HW combination of
  63. // a ChromeOS device. This field will be empty on other OS devices.
  64. optional string full_hardware_class = 16;
  65. // Version information to pin-point which client implementation this is.
  66. oneof client_version_info {
  67. ChromeVersionInfo chrome_version_info = 17;
  68. GooglePlayServicesVersionInfo google_play_services_version_info = 18;
  69. }
  70. }
  71. // Feature specific information about the device that is running a sync-enabled
  72. // Chrome browser. Adding to this proto is discouraged and should only be added
  73. // when the information can not be derived more generally.
  74. message FeatureSpecificFields {
  75. // Tracks whether the SendTabToSelf feature is enabled on the device. For this
  76. // to be true, two things must be true: (1) The receiving side of the feature
  77. // must be enabled on the device (2) The user has enabled sync for this
  78. // feature
  79. optional bool send_tab_to_self_receiving_enabled = 1;
  80. }
  81. // Device specific information for Sharing feature. Used to send end-to-end
  82. // encrypted message through FCM to other devices.
  83. message SharingSpecificFields {
  84. // FCM registration token of device subscribed using VAPID key.
  85. // TODO(crbug.com/1012226): Deprecate when VAPID migration is over.
  86. optional string vapid_fcm_token = 1;
  87. // Public key for message encryption [RFC8291] using VAPID key.
  88. // TODO(crbug.com/1012226): Deprecate when VAPID migration is over.
  89. optional bytes vapid_p256dh = 2;
  90. // Auth secret for message encryption [RFC8291] using VAPID key.
  91. // TODO(crbug.com/1012226): Deprecate when VAPID migration is over.
  92. optional bytes vapid_auth_secret = 3;
  93. // Enum defining available Sharing features.
  94. enum EnabledFeatures {
  95. reserved 5;
  96. reserved "PEER_CONNECTION";
  97. UNKNOWN = 0;
  98. // Supports Click to Call only via VAPID.
  99. CLICK_TO_CALL_VAPID = 1;
  100. // Supports Shared Clipboard only via VAPID.
  101. SHARED_CLIPBOARD_VAPID = 2;
  102. SMS_FETCHER = 3;
  103. REMOTE_COPY = 4;
  104. DISCOVERY = 6;
  105. // Suppots Click to Call via both VAPID and sender ID.
  106. CLICK_TO_CALL_V2 = 7;
  107. // Suppots Shared Clipboard via both VAPID and sender ID.
  108. SHARED_CLIPBOARD_V2 = 8;
  109. // Supports optimization guide push notification.
  110. OPTIMIZATION_GUIDE_PUSH_NOTIFICATION = 9;
  111. }
  112. // A list of enabled Sharing features.
  113. repeated EnabledFeatures enabled_features = 4;
  114. // Deprecated. Use sender_id_fcm_token_v2 for new clients.
  115. optional string sender_id_fcm_token_deprecated = 5 [deprecated = true];
  116. // Deprecated. Use sender_id_p256dh_v2 for new clients.
  117. optional bytes sender_id_p256dh_deprecated = 6 [deprecated = true];
  118. // Deprecated. Use sender_id_auth_secret_v2 for new clients.
  119. optional bytes sender_id_auth_secret_deprecated = 7 [deprecated = true];
  120. // FCM registration token of device subscribed using Sharing sender ID.
  121. optional string sender_id_fcm_token_v2 = 8;
  122. // Public key for message encryption [RFC8291] using Sharing sender ID.
  123. optional bytes sender_id_p256dh_v2 = 9;
  124. // Auth secret for message encryption [RFC8291] using Sharing sender ID.
  125. optional bytes sender_id_auth_secret_v2 = 10;
  126. }
  127. // Device specific information telling how to send invalidations to this device.
  128. message InvalidationSpecificFields {
  129. // FCM registration token of device (using Sync sender ID).
  130. optional string instance_id_token = 1;
  131. // This device wants to receive only invalidations which are related to these
  132. // types. The legitimate values of this field correspond to the protobuf field
  133. // numbers of all EntitySpecifics fields supported by the server (see
  134. // components/sync/protocol/sync.proto).
  135. repeated int32 interested_data_type_ids = 2;
  136. }
  137. message PhoneAsASecurityKeySpecificFields {
  138. // The encoded tunnel server in the same format as in the BLE advert. See
  139. // device::cablev2::tunnelserver::DecodeDomain. (Actually a uint16 but
  140. // proto doesn't have that as a type.)
  141. optional uint32 tunnel_server_domain = 1;
  142. // An FCM token that can be presented to the tunnel server to contact this
  143. // device.
  144. optional bytes contact_id = 2;
  145. // A shared secret key, used to enable communication across devices via
  146. // unauthenticated channels. Knowledge of this secret acts as proof that the
  147. // remote end is authorized to talk to the device publishing this secret.
  148. optional bytes secret = 3;
  149. // An id that identifies |secret|. This, and |secret|, will be rotated and
  150. // the ID allows this device to know which |secret| the counterparty is
  151. // using.
  152. optional fixed32 id = 4;
  153. // A P-256, X9.62-encoded public key for this device. Specific to the Chrome
  154. // instance.
  155. optional bytes peer_public_key_x962 = 5;
  156. }
  157. message ChromeVersionInfo {
  158. // Version number as per https://www.chromium.org/developers/version-numbers.
  159. optional string version_number = 1;
  160. }
  161. message GooglePlayServicesVersionInfo {
  162. optional string apk_version_name = 1;
  163. }