sync_enums.proto 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  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 for communication between sync client and server.
  6. // If you change or add any enums in this file, update
  7. // proto_enum_conversions.{h, cc}.
  8. // If you deprecate enum or enum values, mark any corresponding entry in
  9. // tools/metrics/histograms/enums.xml as <obsolete>.
  10. syntax = "proto2";
  11. option java_multiple_files = true;
  12. option java_package = "org.chromium.components.sync.protocol";
  13. option optimize_for = LITE_RUNTIME;
  14. package sync_pb;
  15. message SyncEnums {
  16. // These events are sent by the DebugInfo class for singleton events.
  17. enum SingletonDebugEventType {
  18. // Connection status change. Note this gets generated even during a
  19. // successful connection.
  20. CONNECTION_STATUS_CHANGE = 1;
  21. // Client received an updated token.
  22. UPDATED_TOKEN = 2;
  23. // Cryptographer needs passphrase.
  24. PASSPHRASE_REQUIRED = 3;
  25. // Passphrase was accepted by cryptographer.
  26. PASSPHRASE_ACCEPTED = 4;
  27. // Sync Initialization is complete.
  28. INITIALIZATION_COMPLETE = 5;
  29. // Server sent stop syncing permanently. This event should never be seen by
  30. // the server in the absence of bugs.
  31. STOP_SYNCING_PERMANENTLY = 6;
  32. // Client has finished encrypting all data.
  33. // DEPRECATED_ENCRYPTION_COMPLETE = 7;
  34. // Client received an actionable error.
  35. ACTIONABLE_ERROR = 8;
  36. // Set of encrypted types has changed.
  37. ENCRYPTED_TYPES_CHANGED = 9;
  38. // The encryption passphrase state changed.
  39. PASSPHRASE_TYPE_CHANGED = 10;
  40. // A new keystore encryption token was persisted. Deprecated 11/2021.
  41. DEPRECATED_KEYSTORE_TOKEN_UPDATED = 11;
  42. // The datatype manager has finished an at least partially successful
  43. // configuration and is once again syncing with the server.
  44. CONFIGURE_COMPLETE = 12;
  45. // A new cryptographer bootstrap token was generated.
  46. DEPRECATED_BOOTSTRAP_TOKEN_UPDATED = 13;
  47. // Cryptographer needs trusted vault decryption keys.
  48. TRUSTED_VAULT_KEY_REQUIRED = 14;
  49. // Cryptographer no longer needs trusted vault decryption keys.
  50. TRUSTED_VAULT_KEY_ACCEPTED = 15;
  51. }
  52. // See ui/base/page_transition_types.h for detailed information on the
  53. // values of PageTransition and PageTransitionRedirectType below.
  54. // Types of transitions between pages.
  55. enum PageTransition {
  56. LINK = 0;
  57. TYPED = 1;
  58. AUTO_BOOKMARK = 2;
  59. AUTO_SUBFRAME = 3;
  60. MANUAL_SUBFRAME = 4;
  61. GENERATED = 5;
  62. AUTO_TOPLEVEL = 6;
  63. FORM_SUBMIT = 7;
  64. RELOAD = 8;
  65. KEYWORD = 9;
  66. KEYWORD_GENERATED = 10;
  67. // The below two were mistakenly added but never properly used. They are
  68. // actually transition qualifiers, and are set independently of other
  69. // qualifiers and of the main transitions. See session_specifics.proto for
  70. // the list of synced transition qualifiers.
  71. // DEPRECATED_CHAIN_START = 12;
  72. // DEPRECATED_CHAIN_END = 13;
  73. }
  74. // Types of redirects that triggered a transition.
  75. enum PageTransitionRedirectType {
  76. CLIENT_REDIRECT = 1;
  77. SERVER_REDIRECT = 2;
  78. }
  79. enum ErrorType {
  80. SUCCESS = 0;
  81. // DEPRECATED_ACCESS_DENIED = 1;
  82. // Returned when the server and client disagree on the store birthday. This
  83. // should be interpreted as all local sync metadata requiring cleanup,
  84. // obviously including the locally-cached store birthday.
  85. NOT_MY_BIRTHDAY = 2;
  86. // Returned when the store has exceeded the allowed bandwidth utilization.
  87. THROTTLED = 3;
  88. // DEPRECATED_AUTH_EXPIRED = 4;
  89. // DEPRECATED_USER_NOT_ACTIVATED = 5;
  90. // DEPRECATED_AUTH_INVALID = 6;
  91. // A clear of the user data is pending (e.g. initiated by privacy request).
  92. // The client should come back later.
  93. CLEAR_PENDING = 7;
  94. // A transient error occurred (e.g. a backend timeout). The client should
  95. // try again later.
  96. TRANSIENT_ERROR = 8;
  97. // A server-side migration has taken place for one or more data types. The
  98. // client should clear the cache for these data types only and then re-sync
  99. // with a server.
  100. MIGRATION_DONE = 9;
  101. // An administrator disabled sync for this domain.
  102. DISABLED_BY_ADMIN = 10;
  103. // Deprecated in M50.
  104. // DEPRECATED_USER_ROLLBACK = 11;
  105. // Returned when the client wants to update several data types, but some of
  106. // them failed (e.g. throttled).
  107. PARTIAL_FAILURE = 12;
  108. // Returned when the server detects that this client's sync metadata is
  109. // obsolete. The client should reset local sync metadata and restart
  110. // syncing.
  111. CLIENT_DATA_OBSOLETE = 13;
  112. // Returned when the server detects that the encryption state (Nigori,
  113. // keystore keys) has been reset/overridden, which means the local
  114. // Nigori-related state is obsolete and should be cleared.
  115. // Introduced in M84.
  116. ENCRYPTION_OBSOLETE = 14;
  117. // Unknown value. This should never be explicitly used; it is the default
  118. // value when an out-of-date client parses a value it doesn't recognize.
  119. UNKNOWN = 100;
  120. }
  121. enum Action {
  122. UPGRADE_CLIENT = 0; // Upgrade the client to latest version.
  123. // DEPRECATED_CLEAR_USER_DATA_AND_RESYNC = 1;
  124. // DEPRECATED_ENABLE_SYNC_ON_ACCOUNT = 2;
  125. // DEPRECATED_STOP_AND_RESTART_SYNC = 3;
  126. // DEPRECATED_DISABLE_SYNC_ON_CLIENT = 4;
  127. UNKNOWN_ACTION = 5; // This is the default.
  128. }
  129. // Please keep in sync with chrome/android/java/.../ForeignSessionHelper.java
  130. enum DeviceType {
  131. TYPE_UNSET = 0;
  132. TYPE_WIN = 1;
  133. TYPE_MAC = 2;
  134. TYPE_LINUX = 3;
  135. TYPE_CROS = 4;
  136. TYPE_OTHER = 5;
  137. TYPE_PHONE = 6;
  138. TYPE_TABLET = 7;
  139. }
  140. // Types of browsers; used for history-related data types.
  141. enum BrowserType {
  142. TYPE_TABBED = 1; // A normal tabbed window.
  143. TYPE_POPUP = 2; // A popup window.
  144. TYPE_CUSTOM_TAB = 3; // A custom tab within an app.
  145. }
  146. // The "password state" is the presence/absence of a password field on a
  147. // website; used for history-related data types.
  148. enum PasswordState {
  149. PASSWORD_STATE_UNKNOWN = 0;
  150. NO_PASSWORD_FIELD = 1;
  151. HAS_PASSWORD_FIELD = 2;
  152. }
  153. // This is the successor to GetUpdatesSource. It merges the "normal mode"
  154. // values (LOCAL, NOTIFICATION and DATATYPE_REFRESH), which were never really
  155. // mutually exclusive to being with, into the GU_TRIGGER value. It also
  156. // drops support for some old values that are not supported by newer clients.
  157. //
  158. // Mind the gaps: Some values are intentionally unused because we want to
  159. // keep the values in sync with GetUpdatesSource as much as possible. Please
  160. // don't add any values < 12 unless there's a good reason for it.
  161. //
  162. // Introduced in M28.
  163. enum GetUpdatesOrigin {
  164. UNKNOWN_ORIGIN = 0; // The source was not set by the caller.
  165. PERIODIC = 4; // The source of the update was periodic polling.
  166. NEWLY_SUPPORTED_DATATYPE = 7; // The client is in configuration mode
  167. // because it's syncing all datatypes, and
  168. // support for a new datatype was recently
  169. // released via a software auto-update.
  170. MIGRATION = 8; // The client is in configuration mode because a
  171. // MIGRATION_DONE error previously returned by the
  172. // server necessitated resynchronization.
  173. NEW_CLIENT = 9; // The client is in configuration mode because the
  174. // user enabled sync for the first time. Not to be
  175. // confused with FIRST_UPDATE.
  176. RECONFIGURATION = 10; // The client is in configuration mode because the
  177. // user opted to sync a different set of datatypes.
  178. GU_TRIGGER = 12; // The client is in 'normal' mode. It may have several
  179. // reasons for requesting an update. See the per-type
  180. // GetUpdateTriggers message for more details.
  181. RETRY = 13; // A retry GU to pick up updates missed by last GU due to
  182. // replication delay, missing hints, etc.
  183. PROGRAMMATIC = 14; // A GU to programmatically enable/disable a
  184. // datatype, often due to error handling.
  185. }
  186. }