OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef SYNC_ENGINE_NON_BLOCKING_SYNC_COMMON_H_ | |
6 #define SYNC_ENGINE_NON_BLOCKING_SYNC_COMMON_H_ | |
7 | |
8 #include <string> | |
9 #include <vector> | |
10 | |
11 #include "base/time/time.h" | |
12 #include "sync/base/sync_export.h" | |
13 #include "sync/protocol/sync.pb.h" | |
14 | |
15 namespace syncer { | |
16 | |
17 struct SYNC_EXPORT_PRIVATE DataTypeState { | |
18 DataTypeState(); | |
19 ~DataTypeState(); | |
20 | |
21 sync_pb::DataTypeProgressMarker progress_marker; | |
22 sync_pb::DataTypeContext type_context; | |
23 std::string parent_id; | |
Nicolas Zea
2014/05/19 23:54:15
why do we have parent_id and next_id here? Aren't
rlarocque
2014/05/20 01:39:47
parent_id: Other than bookmarks, sync doesn't real
Nicolas Zea
2014/05/20 21:51:08
I think it would be clearer to rename these two fi
rlarocque
2014/05/20 22:29:21
Renamed and added lots of comments for this struct
| |
24 int64 next_id; | |
25 }; | |
26 | |
27 struct SYNC_EXPORT_PRIVATE CommitRequestData { | |
28 CommitRequestData(); | |
29 ~CommitRequestData(); | |
30 | |
31 std::string id; | |
32 std::string client_tag; | |
33 int64 sequence_number; | |
Nicolas Zea
2014/05/19 23:54:15
what is sequence number?
rlarocque
2014/05/20 01:39:47
A new concept for non-blocking sync. Feel free to
Nicolas Zea
2014/05/20 21:51:08
The name is fine, I mainly want comments
rlarocque
2014/05/20 22:29:21
Added a comment. It points readers to look for th
| |
34 int64 base_version; | |
35 base::Time ctime; | |
36 base::Time mtime; | |
37 bool deleted; | |
38 sync_pb::EntitySpecifics specifics; | |
Nicolas Zea
2014/05/19 23:54:15
what about non unique name?
rlarocque
2014/05/20 01:39:47
That's a bug.
I must have had the ProcessorCore e
| |
39 }; | |
40 | |
41 struct SYNC_EXPORT_PRIVATE CommitResponseData { | |
42 CommitResponseData(); | |
43 ~CommitResponseData(); | |
44 | |
45 std::string id; | |
46 std::string client_tag_hash; | |
47 int64 sequence_number; | |
48 int64 response_version; | |
49 }; | |
50 | |
51 struct SYNC_EXPORT_PRIVATE UpdateResponseData { | |
52 UpdateResponseData(); | |
53 ~UpdateResponseData(); | |
54 | |
55 std::string id; | |
56 std::string client_tag_hash; | |
57 int64 response_version; | |
Nicolas Zea
2014/05/19 23:54:15
server_version?
rlarocque
2014/05/20 01:39:47
I'm a bit reluctant to use the term 'server_versio
| |
58 base::Time ctime; | |
59 base::Time mtime; | |
60 std::string non_unique_name; | |
61 bool deleted; | |
62 sync_pb::EntitySpecifics specifics; | |
63 }; | |
64 | |
65 typedef std::vector<CommitRequestData> CommitRequestDataList; | |
66 typedef std::vector<CommitResponseData> CommitResponseDataList; | |
67 typedef std::vector<UpdateResponseData> UpdateResponseDataList; | |
68 | |
69 } // namespace syncer | |
70 | |
71 #endif // SYNC_ENGINE_NON_BLOCKING_SYNC_COMMON_H_ | |
OLD | NEW |