Index: sync/api/attachments/attachment_id.cc |
diff --git a/sync/api/attachments/attachment_id.cc b/sync/api/attachments/attachment_id.cc |
index e61705e63ab7daecd4456249790e5bd17b159045..07f34102021517532a8079928b9fc2e91afc70d1 100644 |
--- a/sync/api/attachments/attachment_id.cc |
+++ b/sync/api/attachments/attachment_id.cc |
@@ -52,8 +52,8 @@ bool AttachmentId::operator<(const AttachmentId& other) const { |
} |
// Static. |
-AttachmentId AttachmentId::Create() { |
- sync_pb::AttachmentIdProto proto = CreateAttachmentIdProto(); |
+AttachmentId AttachmentId::Create(size_t size, uint32_t crc32c) { |
+ sync_pb::AttachmentIdProto proto = CreateAttachmentIdProto(size, crc32c); |
return AttachmentId(&proto); |
} |
@@ -71,4 +71,12 @@ const sync_pb::AttachmentIdProto& AttachmentId::GetProto() const { |
AttachmentId::AttachmentId(sync_pb::AttachmentIdProto* proto) |
: proto_(proto) {} |
+size_t AttachmentId::GetSize() const { |
+ return proto_.Get().size_bytes(); |
+} |
+ |
+uint32_t AttachmentId::GetCrc32c() const { |
+ return proto_.Get().crc32c(); |
+} |
+ |
} // namespace syncer |