bookmark_model_metadata.proto 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. // Copyright 2018 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/model_type_state.proto";
  10. import "components/sync/protocol/entity_metadata.proto";
  11. // Corresponds to a single bookmark id/metadata pair.
  12. message BookmarkMetadata {
  13. // Bookmark local id.
  14. optional int64 id = 1;
  15. // Bookmarks sync metadata.
  16. optional EntityMetadata metadata = 2;
  17. }
  18. // Sync proto to carry the sync metadata for the bookmarks model. It is used for
  19. // persisting and loading sync metadata from disk.
  20. message BookmarkModelMetadata {
  21. // Bookmark global metadata.
  22. optional ModelTypeState model_type_state = 1;
  23. // A set of all bookmarks metadata.
  24. repeated BookmarkMetadata bookmarks_metadata = 2;
  25. reserved 3;
  26. reserved 4;
  27. reserved 5;
  28. // Indicates whether the reupload of bookmarks has been triggered such that
  29. // they include fields like |type|, |unique_position| and |parent_guid|, which
  30. // means that their sequence number has been increased (independently of
  31. // whether the commit has succeeded or even started).
  32. // TODO(crbug.com/1232951): remove this code when most of bookmarks are
  33. // reuploaded.
  34. optional bool bookmarks_hierarchy_fields_reuploaded = 6;
  35. // Number of remote updates that were ignored because the parent folder could
  36. // not be determined since sync (bookmark sync) started (since initial sync,
  37. // including initial sync itself). Note that this excludes updates
  38. // representing changes (moves) to existing/tracked bookmarks (i.e. the parent
  39. // folder used to be known, but the new one specified in the update isn't).
  40. //
  41. // Only a minority of users should have a non-zero value, due to a) corrupt
  42. // data, reasons unknown; or b) permanent folders that were unsupported at the
  43. // time the update was received (either for the permanent folder itself or for
  44. // descendants). The absence of this field should be interpreted as 'unknown',
  45. // which roughly means the counter wasn't supported by the browser -M77 or
  46. // below- at the time sync was enabled (it also means, it will remain
  47. // 'unknown' until initial sync is exercised, e.g. sync disabled and
  48. // reenabled).
  49. optional int64 num_ignored_updates_due_to_missing_parent = 7;
  50. // See field above. Among such ignored updates, this field tracks which was
  51. // the highest server version. This may be useful -in the future- to get a
  52. // sense of "time" (or, since versions are opaque to the client, at least a
  53. // notion of ordering with respect to other updates). The absence of this
  54. // field should be interpreted as 'unknown' and does not distinguish the
  55. // case between a) no updates ignored; and b) field wasn't supported at the
  56. // time the last update was ignored. To distinguish between these two, the
  57. // field above can be used.
  58. optional int64 max_version_among_ignored_updates_due_to_missing_parent = 8;
  59. }