| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef SYNC_INTERNAL_API_PUBLIC_NON_BLOCKING_SYNC_COMMON_H_ | 5 #ifndef SYNC_INTERNAL_API_PUBLIC_NON_BLOCKING_SYNC_COMMON_H_ |
| 6 #define SYNC_INTERNAL_API_PUBLIC_NON_BLOCKING_SYNC_COMMON_H_ | 6 #define SYNC_INTERNAL_API_PUBLIC_NON_BLOCKING_SYNC_COMMON_H_ |
| 7 | 7 |
| 8 #include <stdint.h> |
| 9 |
| 8 #include <string> | 10 #include <string> |
| 9 #include <vector> | 11 #include <vector> |
| 10 | 12 |
| 11 #include "base/time/time.h" | 13 #include "base/time/time.h" |
| 12 #include "sync/api/entity_data.h" | 14 #include "sync/api/entity_data.h" |
| 13 #include "sync/base/sync_export.h" | 15 #include "sync/base/sync_export.h" |
| 14 #include "sync/protocol/sync.pb.h" | 16 #include "sync/protocol/sync.pb.h" |
| 15 | 17 |
| 16 namespace syncer_v2 { | 18 namespace syncer_v2 { |
| 17 | 19 |
| 18 static const int64 kUncommittedVersion = -1; | 20 static const int64_t kUncommittedVersion = -1; |
| 19 | 21 |
| 20 // Data-type global state that must be accessed and updated on the sync thread, | 22 // Data-type global state that must be accessed and updated on the sync thread, |
| 21 // but persisted on or through the model thread. | 23 // but persisted on or through the model thread. |
| 22 struct SYNC_EXPORT DataTypeState { | 24 struct SYNC_EXPORT DataTypeState { |
| 23 DataTypeState(); | 25 DataTypeState(); |
| 24 ~DataTypeState(); | 26 ~DataTypeState(); |
| 25 | 27 |
| 26 // The latest progress markers received from the server. | 28 // The latest progress markers received from the server. |
| 27 sync_pb::DataTypeProgressMarker progress_marker; | 29 sync_pb::DataTypeProgressMarker progress_marker; |
| 28 | 30 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 45 | 47 |
| 46 struct SYNC_EXPORT CommitRequestData { | 48 struct SYNC_EXPORT CommitRequestData { |
| 47 CommitRequestData(); | 49 CommitRequestData(); |
| 48 ~CommitRequestData(); | 50 ~CommitRequestData(); |
| 49 | 51 |
| 50 EntityDataPtr entity; | 52 EntityDataPtr entity; |
| 51 | 53 |
| 52 // Strictly incrementing number for in-progress commits. More information | 54 // Strictly incrementing number for in-progress commits. More information |
| 53 // about its meaning can be found in comments in the files that make use of | 55 // about its meaning can be found in comments in the files that make use of |
| 54 // this struct. | 56 // this struct. |
| 55 int64 sequence_number = 0; | 57 int64_t sequence_number = 0; |
| 56 int64 base_version = 0; | 58 int64_t base_version = 0; |
| 57 }; | 59 }; |
| 58 | 60 |
| 59 struct SYNC_EXPORT CommitResponseData { | 61 struct SYNC_EXPORT CommitResponseData { |
| 60 CommitResponseData(); | 62 CommitResponseData(); |
| 61 ~CommitResponseData(); | 63 ~CommitResponseData(); |
| 62 | 64 |
| 63 std::string id; | 65 std::string id; |
| 64 std::string client_tag_hash; | 66 std::string client_tag_hash; |
| 65 int64 sequence_number = 0; | 67 int64_t sequence_number = 0; |
| 66 int64 response_version = 0; | 68 int64_t response_version = 0; |
| 67 }; | 69 }; |
| 68 | 70 |
| 69 struct SYNC_EXPORT UpdateResponseData { | 71 struct SYNC_EXPORT UpdateResponseData { |
| 70 UpdateResponseData(); | 72 UpdateResponseData(); |
| 71 ~UpdateResponseData(); | 73 ~UpdateResponseData(); |
| 72 | 74 |
| 73 EntityDataPtr entity; | 75 EntityDataPtr entity; |
| 74 | 76 |
| 75 int64 response_version = 0; | 77 int64_t response_version = 0; |
| 76 std::string encryption_key_name; | 78 std::string encryption_key_name; |
| 77 }; | 79 }; |
| 78 | 80 |
| 79 typedef std::vector<CommitRequestData> CommitRequestDataList; | 81 typedef std::vector<CommitRequestData> CommitRequestDataList; |
| 80 typedef std::vector<CommitResponseData> CommitResponseDataList; | 82 typedef std::vector<CommitResponseData> CommitResponseDataList; |
| 81 typedef std::vector<UpdateResponseData> UpdateResponseDataList; | 83 typedef std::vector<UpdateResponseData> UpdateResponseDataList; |
| 82 | 84 |
| 83 } // namespace syncer_v2 | 85 } // namespace syncer_v2 |
| 84 | 86 |
| 85 #endif // SYNC_INTERNAL_API_PUBLIC_NON_BLOCKING_SYNC_COMMON_H_ | 87 #endif // SYNC_INTERNAL_API_PUBLIC_NON_BLOCKING_SYNC_COMMON_H_ |
| OLD | NEW |