| Index: sync/internal_api/attachments/on_disk_attachment_store.cc
|
| diff --git a/sync/internal_api/attachments/on_disk_attachment_store.cc b/sync/internal_api/attachments/on_disk_attachment_store.cc
|
| index 699e1f5add122106a7f7030881e3c9731d295c2d..ec6fc75931bd9283d50033f4b055f9f52f514717 100644
|
| --- a/sync/internal_api/attachments/on_disk_attachment_store.cc
|
| +++ b/sync/internal_api/attachments/on_disk_attachment_store.cc
|
| @@ -319,18 +319,12 @@
|
| scoped_refptr<base::RefCountedMemory> data =
|
| base::RefCountedString::TakeString(&data_str);
|
| uint32_t crc32c = ComputeCrc32c(data);
|
| - if (record_metadata.has_crc32c()) {
|
| - if (record_metadata.crc32c() != crc32c) {
|
| - DVLOG(1) << "Attachment crc32c does not match value read from store";
|
| - return attachment.Pass();
|
| - }
|
| - if (record_metadata.crc32c() != attachment_id.GetCrc32c()) {
|
| - DVLOG(1) << "Attachment crc32c does not match value in AttachmentId";
|
| - return attachment.Pass();
|
| - }
|
| + if (record_metadata.has_crc32c() && record_metadata.crc32c() != crc32c) {
|
| + DVLOG(1) << "Attachment crc does not match";
|
| + return attachment.Pass();
|
| }
|
| attachment.reset(
|
| - new Attachment(Attachment::CreateFromParts(attachment_id, data)));
|
| + new Attachment(Attachment::CreateFromParts(attachment_id, data, crc32c)));
|
| return attachment.Pass();
|
| }
|
|
|
|
|