entity_specifics.proto 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. // Copyright 2021 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. syntax = "proto2";
  5. option java_multiple_files = true;
  6. option java_package = "org.chromium.components.sync.protocol";
  7. option optimize_for = LITE_RUNTIME;
  8. package sync_pb;
  9. import "components/sync/protocol/encryption.proto";
  10. import "components/sync/protocol/app_list_specifics.proto";
  11. import "components/sync/protocol/app_notification_specifics.proto";
  12. import "components/sync/protocol/app_setting_specifics.proto";
  13. import "components/sync/protocol/app_specifics.proto";
  14. import "components/sync/protocol/arc_package_specifics.proto";
  15. import "components/sync/protocol/autofill_specifics.proto";
  16. import "components/sync/protocol/autofill_offer_specifics.proto";
  17. import "components/sync/protocol/autofill_wallet_usage_specifics.proto";
  18. import "components/sync/protocol/bookmark_specifics.proto";
  19. import "components/sync/protocol/contact_info_specifics.proto";
  20. import "components/sync/protocol/device_info_specifics.proto";
  21. import "components/sync/protocol/dictionary_specifics.proto";
  22. import "components/sync/protocol/experiments_specifics.proto";
  23. import "components/sync/protocol/extension_setting_specifics.proto";
  24. import "components/sync/protocol/extension_specifics.proto";
  25. import "components/sync/protocol/favicon_image_specifics.proto";
  26. import "components/sync/protocol/favicon_tracking_specifics.proto";
  27. import "components/sync/protocol/history_delete_directive_specifics.proto";
  28. import "components/sync/protocol/history_specifics.proto";
  29. import "components/sync/protocol/managed_user_setting_specifics.proto";
  30. import "components/sync/protocol/managed_user_shared_setting_specifics.proto";
  31. import "components/sync/protocol/managed_user_specifics.proto";
  32. import "components/sync/protocol/nigori_specifics.proto";
  33. import "components/sync/protocol/os_preference_specifics.proto";
  34. import "components/sync/protocol/os_priority_preference_specifics.proto";
  35. import "components/sync/protocol/password_specifics.proto";
  36. import "components/sync/protocol/preference_specifics.proto";
  37. import "components/sync/protocol/printer_specifics.proto";
  38. import "components/sync/protocol/printers_authorization_server_specifics.proto";
  39. import "components/sync/protocol/priority_preference_specifics.proto";
  40. import "components/sync/protocol/reading_list_specifics.proto";
  41. import "components/sync/protocol/saved_tab_group_specifics.proto";
  42. import "components/sync/protocol/search_engine_specifics.proto";
  43. import "components/sync/protocol/security_event_specifics.proto";
  44. import "components/sync/protocol/send_tab_to_self_specifics.proto";
  45. import "components/sync/protocol/session_specifics.proto";
  46. import "components/sync/protocol/sharing_message_specifics.proto";
  47. import "components/sync/protocol/synced_notification_app_info_specifics.proto";
  48. import "components/sync/protocol/synced_notification_specifics.proto";
  49. import "components/sync/protocol/theme_specifics.proto";
  50. import "components/sync/protocol/typed_url_specifics.proto";
  51. import "components/sync/protocol/user_consent_specifics.proto";
  52. import "components/sync/protocol/user_event_specifics.proto";
  53. import "components/sync/protocol/web_app_specifics.proto";
  54. import "components/sync/protocol/webauthn_credential_specifics.proto";
  55. import "components/sync/protocol/wifi_configuration_specifics.proto";
  56. import "components/sync/protocol/workspace_desk_specifics.proto";
  57. message EntitySpecifics {
  58. // If a datatype is encrypted, this field will contain the encrypted
  59. // original EntitySpecifics. The extension for the datatype will continue
  60. // to exist, but contain only the default values.
  61. // Note that currently passwords employ their own legacy encryption scheme and
  62. // do not use this field.
  63. optional EncryptedData encrypted = 1;
  64. // To add new datatype-specific fields to the protocol, extend
  65. // EntitySpecifics. First, pick a non-colliding tag number by
  66. // picking a Cr-Commit-Position of one of your past commits
  67. // to src.chromium.org. Then, in a different protocol buffer
  68. // definition, define your message type, and add an optional field
  69. // to the list below using the unique tag value you selected.
  70. //
  71. // optional MyDatatypeSpecifics my_datatype = 32222;
  72. //
  73. // where:
  74. // - 32222 is the non-colliding tag number you picked earlier.
  75. // - MyDatatypeSpecifics is the type (probably a message type defined
  76. // in your new .proto file) that you want to associate with each
  77. // object of the new datatype.
  78. // - my_datatype is the field identifier you'll use to access the
  79. // datatype specifics from the code.
  80. //
  81. // Server implementations are obligated to preserve the contents of
  82. // EntitySpecifics when it contains unrecognized fields. In this
  83. // way, it is possible to add new datatype fields without having
  84. // to update the server.
  85. //
  86. // Note: The tag selection process is based on legacy versions of the
  87. // protocol which used protobuf extensions. We have kept the process
  88. // consistent as the old values cannot change. The 5+ digit nature of the
  89. // tags also makes them recognizable (individually and collectively) from
  90. // noise in logs and debugging contexts, and creating a divergent subset of
  91. // tags would only make things a bit more confusing.
  92. oneof specifics_variant {
  93. AutofillSpecifics autofill = 31729;
  94. BookmarkSpecifics bookmark = 32904;
  95. PreferenceSpecifics preference = 37702;
  96. TypedUrlSpecifics typed_url = 40781;
  97. ThemeSpecifics theme = 41210;
  98. // TODO(crbug.com/1012648): |app_notification| isn't used by the client
  99. // anymore, but the server still needs it for now.
  100. AppNotification app_notification = 45184 [deprecated = true];
  101. PasswordSpecifics password = 45873;
  102. NigoriSpecifics nigori = 47745;
  103. ExtensionSpecifics extension = 48119;
  104. AppSpecifics app = 48364;
  105. SessionSpecifics session = 50119;
  106. AutofillProfileSpecifics autofill_profile = 63951;
  107. SearchEngineSpecifics search_engine = 88610;
  108. ExtensionSettingSpecifics extension_setting = 96159;
  109. AppSettingSpecifics app_setting = 103656;
  110. HistoryDeleteDirectiveSpecifics history_delete_directive = 150251;
  111. // TODO(crbug.com/1012648): |synced_notification| and
  112. // |synced_notification_app_info| aren't used by the client anymore, but the
  113. // server still needs them for now.
  114. SyncedNotificationSpecifics synced_notification = 153108
  115. [deprecated = true];
  116. SyncedNotificationAppInfoSpecifics synced_notification_app_info = 235816
  117. [deprecated = true];
  118. DeviceInfoSpecifics device_info = 154522;
  119. // TODO(crbug.com/1009361): |experiments| isn't used by the client anymore,
  120. // but the server still needs it for now.
  121. ExperimentsSpecifics experiments = 161496 [deprecated = true];
  122. PriorityPreferenceSpecifics priority_preference = 163425;
  123. DictionarySpecifics dictionary = 170540;
  124. FaviconTrackingSpecifics favicon_tracking = 181534 [deprecated = true];
  125. FaviconImageSpecifics favicon_image = 182019 [deprecated = true];
  126. ManagedUserSettingSpecifics managed_user_setting = 186662;
  127. // TODO(tschumann): Remove once server-side dependencies are resolved.
  128. ManagedUserSpecifics managed_user = 194582 [deprecated = true];
  129. // TODO(tschumann): Remove once server-side dependencies are resolved.
  130. ManagedUserSharedSettingSpecifics managed_user_shared_setting = 202026
  131. [deprecated = true];
  132. AppListSpecifics app_list = 229170;
  133. EmptySpecifics managed_user_allowlist = 306060 [deprecated = true];
  134. AutofillWalletSpecifics autofill_wallet = 306270;
  135. WalletMetadataSpecifics wallet_metadata = 330441;
  136. ArcPackageSpecifics arc_package = 340906;
  137. PrinterSpecifics printer = 410745;
  138. ReadingListSpecifics reading_list = 411028;
  139. UserEventSpecifics user_event = 455206;
  140. UserConsentSpecifics user_consent = 556014;
  141. SendTabToSelfSpecifics send_tab_to_self = 601980;
  142. SecurityEventSpecifics security_event = 600372;
  143. WebAppSpecifics web_app = 673225;
  144. WifiConfigurationSpecifics wifi_configuration = 662827;
  145. OsPreferenceSpecifics os_preference = 702141;
  146. OsPriorityPreferenceSpecifics os_priority_preference = 703915;
  147. SharingMessageSpecifics sharing_message = 728866;
  148. AutofillOfferSpecifics autofill_offer = 774329;
  149. WorkspaceDeskSpecifics workspace_desk = 874841;
  150. // This is not included in model_type.h because it's currently only used by
  151. // the server and by Play Services. (crbug.com/1223853)
  152. WebauthnCredentialSpecifics webauthn_credential = 895275;
  153. HistorySpecifics history = 963985;
  154. PrintersAuthorizationServerSpecifics printers_authorization_server = 974304;
  155. SavedTabGroupSpecifics saved_tab_group = 1004874;
  156. AutofillWalletUsageSpecifics autofill_wallet_usage = 1033580;
  157. ContactInfoSpecifics contact_info = 1034378;
  158. }
  159. reserved 218175;
  160. reserved "wifi_credential";
  161. reserved 223759;
  162. reserved "article";
  163. reserved 545005;
  164. reserved "mountain_share";
  165. }
  166. message EmptySpecifics {}