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 "sync/protocol/proto_value_conversions.h" | 7 #include "sync/protocol/proto_value_conversions.h" |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
842 SET_INT64(position_in_parent); | 842 SET_INT64(position_in_parent); |
843 SET(unique_position, UniquePositionToStringValue); | 843 SET(unique_position, UniquePositionToStringValue); |
844 SET_STR(insert_after_item_id); | 844 SET_STR(insert_after_item_id); |
845 SET_BOOL(deleted); | 845 SET_BOOL(deleted); |
846 SET_STR(originator_cache_guid); | 846 SET_STR(originator_cache_guid); |
847 SET_STR(originator_client_item_id); | 847 SET_STR(originator_client_item_id); |
848 if (include_specifics) | 848 if (include_specifics) |
849 SET(specifics, EntitySpecificsToValue); | 849 SET(specifics, EntitySpecificsToValue); |
850 SET_BOOL(folder); | 850 SET_BOOL(folder); |
851 SET_STR(client_defined_unique_tag); | 851 SET_STR(client_defined_unique_tag); |
| 852 SET_REP(attachment_id, AttachmentIdProtoToValue); |
852 return value; | 853 return value; |
853 } | 854 } |
854 | 855 |
855 namespace { | 856 namespace { |
856 | 857 |
857 base::ListValue* SyncEntitiesToValue( | 858 base::ListValue* SyncEntitiesToValue( |
858 const ::google::protobuf::RepeatedPtrField<sync_pb::SyncEntity>& entities, | 859 const ::google::protobuf::RepeatedPtrField<sync_pb::SyncEntity>& entities, |
859 bool include_specifics) { | 860 bool include_specifics) { |
860 base::ListValue* list = new base::ListValue(); | 861 base::ListValue* list = new base::ListValue(); |
861 ::google::protobuf::RepeatedPtrField<sync_pb::SyncEntity>::const_iterator it; | 862 ::google::protobuf::RepeatedPtrField<sync_pb::SyncEntity>::const_iterator it; |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1119 #undef SET_BYTES | 1120 #undef SET_BYTES |
1120 #undef SET_INT32 | 1121 #undef SET_INT32 |
1121 #undef SET_INT64 | 1122 #undef SET_INT64 |
1122 #undef SET_INT64_REP | 1123 #undef SET_INT64_REP |
1123 #undef SET_STR | 1124 #undef SET_STR |
1124 #undef SET_STR_REP | 1125 #undef SET_STR_REP |
1125 | 1126 |
1126 #undef SET_FIELD | 1127 #undef SET_FIELD |
1127 | 1128 |
1128 } // namespace syncer | 1129 } // namespace syncer |
OLD | NEW |