Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Unified Diff: sync/internal_api/attachments/attachment_store_test_template.h

Issue 710073003: Store attachment crc in AttachmentStore (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Add comment in attachment_util.h. Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sync/internal_api/attachments/attachment_store_test_template.h
diff --git a/sync/internal_api/attachments/attachment_store_test_template.h b/sync/internal_api/attachments/attachment_store_test_template.h
index 1d9bd053daa1c31bf2153e3b34abe957509ce783..cd1c016f1d1571e311155b69ebdf81f895b65555 100644
--- a/sync/internal_api/attachments/attachment_store_test_template.h
+++ b/sync/internal_api/attachments/attachment_store_test_template.h
@@ -14,6 +14,7 @@
#include "base/message_loop/message_loop.h"
#include "base/thread_task_runner_handle.h"
#include "sync/api/attachments/attachment.h"
+#include "sync/internal_api/public/attachments/attachment_util.h"
#include "sync/protocol/sync.pb.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -116,8 +117,9 @@ TYPED_TEST_CASE_P(AttachmentStoreTest);
TYPED_TEST_P(AttachmentStoreTest, Write_NoOverwriteNoError) {
// Create two attachments with the same id but different data.
Attachment attachment1 = Attachment::Create(this->some_data1);
- Attachment attachment2 =
- Attachment::CreateWithId(attachment1.GetId(), this->some_data2);
+ uint32_t crc32c = ComputeCrc32c(this->some_data2);
+ Attachment attachment2 = Attachment::CreateFromParts(
+ attachment1.GetId(), this->some_data2, crc32c);
// Write the first one.
AttachmentList some_attachments;

Powered by Google App Engine
This is Rietveld 408576698