Chromium Code Reviews| 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_ENGINE_NON_BLOCKING_SYNC_COMMON_H_ | 5 #ifndef SYNC_ENGINE_NON_BLOCKING_SYNC_COMMON_H_ |
| 6 #define SYNC_ENGINE_NON_BLOCKING_SYNC_COMMON_H_ | 6 #define SYNC_ENGINE_NON_BLOCKING_SYNC_COMMON_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/time/time.h" | 11 #include "base/time/time.h" |
| 12 #include "sync/base/sync_export.h" | 12 #include "sync/base/sync_export.h" |
| 13 #include "sync/protocol/sync.pb.h" | 13 #include "sync/protocol/sync.pb.h" |
| 14 | 14 |
| 15 namespace syncer { | 15 namespace syncer { |
| 16 | 16 |
| 17 static const int64 kUncommittedVersion = -1; | |
|
Nicolas Zea
2014/05/28 23:56:15
Any reason this was changed from 0 to -1?
rlarocque
2014/05/29 20:54:52
-1 is what the current sync engine uses.
| |
| 18 | |
| 17 // Data-type global state that must be accessed and updated on the sync thread, | 19 // Data-type global state that must be accessed and updated on the sync thread, |
| 18 // but persisted on or through the model thread. | 20 // but persisted on or through the model thread. |
| 19 struct SYNC_EXPORT_PRIVATE DataTypeState { | 21 struct SYNC_EXPORT_PRIVATE DataTypeState { |
| 20 DataTypeState(); | 22 DataTypeState(); |
| 21 ~DataTypeState(); | 23 ~DataTypeState(); |
| 22 | 24 |
| 23 // The latest progress markers received from the server. | 25 // The latest progress markers received from the server. |
| 24 sync_pb::DataTypeProgressMarker progress_marker; | 26 sync_pb::DataTypeProgressMarker progress_marker; |
| 25 | 27 |
| 26 // A data type context. Sent to the server in every commit or update | 28 // A data type context. Sent to the server in every commit or update |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 89 sync_pb::EntitySpecifics specifics; | 91 sync_pb::EntitySpecifics specifics; |
| 90 }; | 92 }; |
| 91 | 93 |
| 92 typedef std::vector<CommitRequestData> CommitRequestDataList; | 94 typedef std::vector<CommitRequestData> CommitRequestDataList; |
| 93 typedef std::vector<CommitResponseData> CommitResponseDataList; | 95 typedef std::vector<CommitResponseData> CommitResponseDataList; |
| 94 typedef std::vector<UpdateResponseData> UpdateResponseDataList; | 96 typedef std::vector<UpdateResponseData> UpdateResponseDataList; |
| 95 | 97 |
| 96 } // namespace syncer | 98 } // namespace syncer |
| 97 | 99 |
| 98 #endif // SYNC_ENGINE_NON_BLOCKING_SYNC_COMMON_H_ | 100 #endif // SYNC_ENGINE_NON_BLOCKING_SYNC_COMMON_H_ |
| OLD | NEW |