OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Keep this file in sync with the .proto files in this directory. | 5 // Keep this file in sync with the .proto files in this directory. |
6 | 6 |
7 #include "components/sync/protocol/proto_value_conversions.h" | 7 #include "components/sync/protocol/proto_value_conversions.h" |
8 | 8 |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "components/sync/base/unique_position.h" | 22 #include "components/sync/base/unique_position.h" |
23 #include "components/sync/protocol/app_list_specifics.pb.h" | 23 #include "components/sync/protocol/app_list_specifics.pb.h" |
24 #include "components/sync/protocol/app_notification_specifics.pb.h" | 24 #include "components/sync/protocol/app_notification_specifics.pb.h" |
25 #include "components/sync/protocol/app_setting_specifics.pb.h" | 25 #include "components/sync/protocol/app_setting_specifics.pb.h" |
26 #include "components/sync/protocol/app_specifics.pb.h" | 26 #include "components/sync/protocol/app_specifics.pb.h" |
27 #include "components/sync/protocol/arc_package_specifics.pb.h" | 27 #include "components/sync/protocol/arc_package_specifics.pb.h" |
28 #include "components/sync/protocol/autofill_specifics.pb.h" | 28 #include "components/sync/protocol/autofill_specifics.pb.h" |
29 #include "components/sync/protocol/bookmark_specifics.pb.h" | 29 #include "components/sync/protocol/bookmark_specifics.pb.h" |
30 #include "components/sync/protocol/dictionary_specifics.pb.h" | 30 #include "components/sync/protocol/dictionary_specifics.pb.h" |
31 #include "components/sync/protocol/encryption.pb.h" | 31 #include "components/sync/protocol/encryption.pb.h" |
| 32 #include "components/sync/protocol/entity_metadata.pb.h" |
32 #include "components/sync/protocol/experiments_specifics.pb.h" | 33 #include "components/sync/protocol/experiments_specifics.pb.h" |
33 #include "components/sync/protocol/extension_setting_specifics.pb.h" | 34 #include "components/sync/protocol/extension_setting_specifics.pb.h" |
34 #include "components/sync/protocol/extension_specifics.pb.h" | 35 #include "components/sync/protocol/extension_specifics.pb.h" |
35 #include "components/sync/protocol/favicon_image_specifics.pb.h" | 36 #include "components/sync/protocol/favicon_image_specifics.pb.h" |
36 #include "components/sync/protocol/favicon_tracking_specifics.pb.h" | 37 #include "components/sync/protocol/favicon_tracking_specifics.pb.h" |
37 #include "components/sync/protocol/history_delete_directive_specifics.pb.h" | 38 #include "components/sync/protocol/history_delete_directive_specifics.pb.h" |
38 #include "components/sync/protocol/nigori_specifics.pb.h" | 39 #include "components/sync/protocol/nigori_specifics.pb.h" |
39 #include "components/sync/protocol/password_specifics.pb.h" | 40 #include "components/sync/protocol/password_specifics.pb.h" |
40 #include "components/sync/protocol/preference_specifics.pb.h" | 41 #include "components/sync/protocol/preference_specifics.pb.h" |
41 #include "components/sync/protocol/priority_preference_specifics.pb.h" | 42 #include "components/sync/protocol/priority_preference_specifics.pb.h" |
(...skipping 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1083 return value; | 1084 return value; |
1084 } | 1085 } |
1085 | 1086 |
1086 std::unique_ptr<base::DictionaryValue> AttachmentIdProtoToValue( | 1087 std::unique_ptr<base::DictionaryValue> AttachmentIdProtoToValue( |
1087 const sync_pb::AttachmentIdProto& proto) { | 1088 const sync_pb::AttachmentIdProto& proto) { |
1088 std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue()); | 1089 std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue()); |
1089 SET_STR(unique_id); | 1090 SET_STR(unique_id); |
1090 return value; | 1091 return value; |
1091 } | 1092 } |
1092 | 1093 |
| 1094 std::unique_ptr<base::DictionaryValue> EntityMetadataToValue( |
| 1095 const sync_pb::EntityMetadata& proto) { |
| 1096 std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue()); |
| 1097 SET_STR(client_tag_hash); |
| 1098 SET_STR(server_id); |
| 1099 SET_BOOL(is_deleted); |
| 1100 SET_INT64(sequence_number); |
| 1101 SET_INT64(acked_sequence_number); |
| 1102 SET_INT64(server_version); |
| 1103 SET_INT64(creation_time); |
| 1104 SET_INT64(modification_time); |
| 1105 SET_STR(specifics_hash); |
| 1106 SET_STR(base_specifics_hash); |
| 1107 return value; |
| 1108 } |
| 1109 |
1093 #undef SET_TYPE | 1110 #undef SET_TYPE |
1094 #undef SET | 1111 #undef SET |
1095 #undef SET_REP | 1112 #undef SET_REP |
1096 | 1113 |
1097 #undef SET_BOOL | 1114 #undef SET_BOOL |
1098 #undef SET_BYTES | 1115 #undef SET_BYTES |
1099 #undef SET_INT32 | 1116 #undef SET_INT32 |
1100 #undef SET_INT64 | 1117 #undef SET_INT64 |
1101 #undef SET_INT64_REP | 1118 #undef SET_INT64_REP |
1102 #undef SET_STR | 1119 #undef SET_STR |
1103 #undef SET_STR_REP | 1120 #undef SET_STR_REP |
1104 | 1121 |
1105 #undef SET_FIELD | 1122 #undef SET_FIELD |
1106 | 1123 |
1107 } // namespace syncer | 1124 } // namespace syncer |
OLD | NEW |