Index: sync/internal_api/public/non_blocking_sync_common.h |
diff --git a/sync/internal_api/public/non_blocking_sync_common.h b/sync/internal_api/public/non_blocking_sync_common.h |
index 7c7580bb53521718cdf9527a34f0df92f8600ba4..0ef71b4a0771ef5726f9ee4bb77791ab87f5d91c 100644 |
--- a/sync/internal_api/public/non_blocking_sync_common.h |
+++ b/sync/internal_api/public/non_blocking_sync_common.h |
@@ -16,42 +16,6 @@ namespace syncer { |
static const int64 kUncommittedVersion = -1; |
-// Data-type global state that must be accessed and updated on the sync thread, |
-// but persisted on or through the model thread. |
-struct SYNC_EXPORT_PRIVATE DataTypeState { |
- DataTypeState(); |
- ~DataTypeState(); |
- |
- // The latest progress markers received from the server. |
- sync_pb::DataTypeProgressMarker progress_marker; |
- |
- // A data type context. Sent to the server in every commit or update |
- // request. May be updated by either by responses from the server or |
- // requests made on the model thread. The interpretation of this value may |
- // be data-type specific. Many data types ignore it. |
- sync_pb::DataTypeContext type_context; |
- |
- // The ID of the folder node that sits at the top of this type's folder |
- // hierarchy. We keep this around for legacy reasons. The protocol expects |
- // that all nodes of a certain type are children of the same type root |
- // entity. This entity is delivered by the server, and may not be available |
- // until the first download cycle has completed. |
- std::string type_root_id; |
- |
- // A strictly increasing counter used to generate unique values for the |
- // client-assigned IDs. The incrementing and ID assignment happens on the |
- // sync thread, but we store the value here so we can pass it back to the |
- // model thread for persistence. This is probably unnecessary for the |
- // client-tagged data types supported by non-blocking sync, but we will |
- // continue to emulate the directory sync's behavior for now. |
- int64 next_client_id; |
- |
- // This flag is set to true when the first download cycle is complete. The |
- // ModelTypeSyncProxy should not attempt to commit any items until this |
- // flag is set. |
- bool initial_sync_done; |
-}; |
- |
struct SYNC_EXPORT_PRIVATE CommitRequestData { |
CommitRequestData(); |
~CommitRequestData(); |
@@ -94,12 +58,54 @@ struct SYNC_EXPORT_PRIVATE UpdateResponseData { |
std::string non_unique_name; |
bool deleted; |
sync_pb::EntitySpecifics specifics; |
+ std::string encryption_key_name; |
}; |
typedef std::vector<CommitRequestData> CommitRequestDataList; |
typedef std::vector<CommitResponseData> CommitResponseDataList; |
typedef std::vector<UpdateResponseData> UpdateResponseDataList; |
+// Data-type global state that must be accessed and updated on the sync thread, |
+// but persisted on or through the model thread. |
+struct SYNC_EXPORT_PRIVATE DataTypeState { |
+ DataTypeState(); |
+ ~DataTypeState(); |
+ |
+ // The latest progress markers received from the server. |
+ sync_pb::DataTypeProgressMarker progress_marker; |
+ |
+ // A data type context. Sent to the server in every commit or update |
+ // request. May be updated by either by responses from the server or |
+ // requests made on the model thread. The interpretation of this value may |
+ // be data-type specific. Many data types ignore it. |
+ sync_pb::DataTypeContext type_context; |
+ |
+ // The ID of the folder node that sits at the top of this type's folder |
+ // hierarchy. We keep this around for legacy reasons. The protocol expects |
+ // that all nodes of a certain type are children of the same type root |
+ // entity. This entity is delivered by the server, and may not be available |
+ // until the first download cycle has completed. |
+ std::string type_root_id; |
+ |
+ // This value is set if this type's data should be encrypted on the server. |
+ // If this key changes, the client will need to re-commit all of its local |
+ // data to the server using the new encryption key. |
+ std::string encryption_key_name; |
+ |
+ // A strictly increasing counter used to generate unique values for the |
+ // client-assigned IDs. The incrementing and ID assignment happens on the |
+ // sync thread, but we store the value here so we can pass it back to the |
+ // model thread for persistence. This is probably unnecessary for the |
+ // client-tagged data types supported by non-blocking sync, but we will |
+ // continue to emulate the directory sync's behavior for now. |
+ int64 next_client_id; |
+ |
+ // This flag is set to true when the first download cycle is complete. The |
+ // ModelTypeSyncProxy should not attempt to commit any items until this |
+ // flag is set. |
+ bool initial_sync_done; |
+}; |
+ |
} // namespace syncer |
#endif // SYNC_INTERNAL_API_PUBLIC_NON_BLOCKING_SYNC_COMMON_H_ |