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 #include "sync/internal_api/public/base/attachment_id_proto.h" | 5 #include "sync/internal_api/public/base/attachment_id_proto.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 #include <stdint.h> |
| 9 |
7 #include <string> | 10 #include <string> |
8 | 11 |
9 #include "base/guid.h" | 12 #include "base/guid.h" |
10 #include "base/logging.h" | 13 #include "base/logging.h" |
11 #include "base/strings/string_util.h" | 14 #include "base/strings/string_util.h" |
12 | 15 |
13 namespace syncer { | 16 namespace syncer { |
14 | 17 |
15 sync_pb::AttachmentIdProto CreateAttachmentIdProto(size_t size, | 18 sync_pb::AttachmentIdProto CreateAttachmentIdProto(size_t size, |
16 uint32_t crc32c) { | 19 uint32_t crc32c) { |
(...skipping 13 matching lines...) Expand all Loading... |
30 sync_pb::AttachmentMetadata result; | 33 sync_pb::AttachmentMetadata result; |
31 for (int i = 0; i < ids.size(); ++i) { | 34 for (int i = 0; i < ids.size(); ++i) { |
32 sync_pb::AttachmentMetadataRecord* record = result.add_record(); | 35 sync_pb::AttachmentMetadataRecord* record = result.add_record(); |
33 *record->mutable_id() = ids.Get(i); | 36 *record->mutable_id() = ids.Get(i); |
34 record->set_is_on_server(true); | 37 record->set_is_on_server(true); |
35 } | 38 } |
36 return result; | 39 return result; |
37 } | 40 } |
38 | 41 |
39 } // namespace syncer | 42 } // namespace syncer |
OLD | NEW |