model_type_state.proto 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // Copyright 2016 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. // If you change or add any fields in this file, update proto_visitors.h and
  5. // potentially proto_enum_conversions.{h, cc}.
  6. syntax = "proto2";
  7. option java_multiple_files = true;
  8. option java_package = "org.chromium.components.sync.protocol";
  9. option optimize_for = LITE_RUNTIME;
  10. package sync_pb;
  11. import "components/sync/protocol/data_type_progress_marker.proto";
  12. // Sync proto to store data type global metadata in model type storage.
  13. message ModelTypeState {
  14. // The latest progress markers received from the server.
  15. optional DataTypeProgressMarker progress_marker = 1;
  16. // A data type context. Sent to the server in every commit or update
  17. // request. May be updated by either responses from the server or requests
  18. // made on the model thread. The interpretation of this value may be
  19. // data-type specific. Many data types ignore it.
  20. optional DataTypeContext type_context = 2;
  21. // This value is set if this type's data should be encrypted on the server.
  22. // If this key changes, the client will need to re-commit all of its local
  23. // data to the server using the new encryption key.
  24. optional string encryption_key_name = 3;
  25. // This flag is set to true when the first download cycle is complete. The
  26. // ModelTypeProcessor should not attempt to commit any items until this
  27. // flag is set.
  28. optional bool initial_sync_done = 4;
  29. // A GUID that identifies the committing sync client. It's persisted within
  30. // the sync metadata and should be used to check the integrity of the
  31. // metadata. Mismatches with the guid of the running client indicates invalid
  32. // persisted sync metadata, because cache_guid is reset when sync is disabled,
  33. // and disabling sync is supposed to clear sync metadata.
  34. optional string cache_guid = 5;
  35. // Syncing account ID, representing the user.
  36. optional string authenticated_account_id = 6;
  37. }