Index: sync/internal_api/attachments/fake_attachment_downloader.cc |
diff --git a/sync/internal_api/attachments/fake_attachment_downloader.cc b/sync/internal_api/attachments/fake_attachment_downloader.cc |
index 1f2795e7dfdd849c42e122f13de4c907068555a3..53abc61da11ca18381381e3f7de83c0ce02d2589 100644 |
--- a/sync/internal_api/attachments/fake_attachment_downloader.cc |
+++ b/sync/internal_api/attachments/fake_attachment_downloader.cc |
@@ -6,6 +6,7 @@ |
#include "base/bind.h" |
#include "base/message_loop/message_loop.h" |
+#include "sync/internal_api/public/attachments/attachment_util.h" |
namespace syncer { |
@@ -24,8 +25,9 @@ void FakeAttachmentDownloader::DownloadAttachment( |
// attachment. |
scoped_refptr<base::RefCountedMemory> data(new base::RefCountedBytes()); |
scoped_ptr<Attachment> attachment; |
+ const uint32_t crc32c = ComputeCrc32c(data); |
attachment.reset( |
- new Attachment(Attachment::CreateWithId(attachment_id, data))); |
+ new Attachment(Attachment::CreateFromParts(attachment_id, data, crc32c))); |
base::MessageLoop::current()->PostTask( |
FROM_HERE, |
base::Bind(callback, DOWNLOAD_SUCCESS, base::Passed(&attachment))); |