summaryrefslogtreecommitdiffstats
path: root/components/sync_driver
diff options
context:
space:
mode:
authordgrogan <dgrogan@chromium.org>2015-03-09 18:34:12 -0700
committerCommit bot <commit-bot@chromium.org>2015-03-10 01:35:13 +0000
commiteb83b6cff47a33585e4d315f1517eaff14132bb5 (patch)
tree185da9b5f021110dce3ddff99ba53504cfe5d6ec /components/sync_driver
parentbf68f4d5ba5c035cf1aaaa4ee5915cd3e7c15327 (diff)
downloadchromium_src-eb83b6cff47a33585e4d315f1517eaff14132bb5.zip
chromium_src-eb83b6cff47a33585e4d315f1517eaff14132bb5.tar.gz
chromium_src-eb83b6cff47a33585e4d315f1517eaff14132bb5.tar.bz2
Revert of [Sync] Add size and crc32c to AttachmentId. (patchset #8 id:140001 of https://codereview.chromium.org/982883002/)
Reason for revert: Broke build on iOS_Device http://build.chromium.org/p/chromium.mac/builders/iOS_Device/builds/26684/steps/compile/logs/stdio Undefined symbols for architecture armv7: "syncer::Attachment::CreateFromParts(syncer::AttachmentId const&, scoped_refptr<base::RefCountedMemory> const&, unsigned int)", referenced from: syncer::(anonymous namespace)::MockAttachmentStore::RespondToRead(std::__1::set<syncer::AttachmentId, std::__1::less<syncer::AttachmentId>, std::__1::allocator<syncer::AttachmentId> > const&) in attachment_service_impl_unittest.o syncer::(anonymous namespace)::MockAttachmentDownloader::RespondToDownload(syncer::AttachmentId const&, syncer::AttachmentDownloader::DownloadResult const&) in attachment_service_impl_unittest.o syncer::gtest_case_AttachmentStoreTest_::Write_NoOverwriteNoError<syncer::InMemoryAttachmentStoreFactory>::TestBody() in in_memory_attachment_store_unittest.o syncer::OnDiskAttachmentStoreSpecificTest_MismatchedCrc_Test::TestBody() in on_disk_attachment_store_unittest.o syncer::gtest_case_AttachmentStoreTest_::Write_NoOverwriteNoError<syncer::OnDiskAttachmentStoreFactory>::TestBody() in on_disk_attachment_store_unittest.o "syncer::CreateAttachmentIdProto()", referenced from: syncer::AddAttachment(sync_pb::AttachmentMetadata*, bool) in directory_commit_contribution_unittest.o syncer::DirectoryUpdateHandlerProcessUpdateTest_ProcessAndApplyUpdatesWithAttachments_Test::TestBody() in directory_update_handler_unittest.o syncer::DirectoryUpdateHandlerApplyUpdateTest_SimpleConflictDifferentAttachmentMetadata_Test::TestBody() in directory_update_handler_unittest.o syncer::DirectoryUpdateHandlerApplyUpdateTest_SimpleConflictSameAttachmentMetadataDifferentOrder_Test::TestBody() in directory_update_handler_unittest.o syncer::AttachmentIdProtoTest_UniqueIdFormat_Test::TestBody() in attachment_id_proto_unittest.o syncer::AttachmentIdProtoTest_CreateAttachmentMetadata_NonEmpty_Test::TestBody() in attachment_id_proto_unittest.o syncer::SyncManagerChangeProcessingTest_AttachmentMetadataOnlyChanges_Test::TestBody() in sync_manager_impl_unittest.o ... "syncer::AttachmentId::Create()", referenced from: syncer::(anonymous namespace)::SyncDataTest_CreateLocalDataWithAttachments_Test::TestBody() in sync_data_unittest.o syncer::AttachmentDownloaderImplTest_HappyCase_Test::TestBody() in attachment_downloader_impl_unittest.o syncer::AttachmentDownloaderImplTest_SameIdMultipleDownloads_Test::TestBody() in attachment_downloader_impl_unittest.o syncer::AttachmentDownloaderImplTest_RequestAccessTokenFails_Test::TestBody() in attachment_downloader_impl_unittest.o syncer::AttachmentDownloaderImplTest_URLFetcher_BadToken_Test::TestBody() in attachment_downloader_impl_unittest.o syncer::AttachmentDownloaderImplTest_URLFetcher_ServiceUnavailable_Test::TestBody() in attachment_downloader_impl_unittest.o syncer::AttachmentDownloaderImplTest_NoHash_Test::TestBody() in attachment_downloader_impl_unittest.o ... ld: symbol(s) not found for architecture armv7 clang:error: linker command failed with exit code 1 (use -v to see invocation) Original issue's description: > [Sync] Add size and crc32c to AttachmentId. > > The purpose of this change is to ensure that if a client knows about an > attachment (i.e. has an AttachmentId or AttachmentIdProto) it will know > the attachment's size even if the attachment has never been available on > the local device. > > The idea is that by storing size locally, we can simplify remote storage > management. > > Move crc32c out of Attachment now that it's part of AttachmentId. > > BUG=464431 > > Committed: https://crrev.com/23ae3128db0d84a6b1ffa640568a5ec90cfc8808 > Cr-Commit-Position: refs/heads/master@{#319794} TBR=pavely@chromium.org,maniscalco@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=464431 Review URL: https://codereview.chromium.org/995683002 Cr-Commit-Position: refs/heads/master@{#319807}
Diffstat (limited to 'components/sync_driver')
-rw-r--r--components/sync_driver/generic_change_processor_unittest.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/components/sync_driver/generic_change_processor_unittest.cc b/components/sync_driver/generic_change_processor_unittest.cc
index e262bfe..cb0a4fc 100644
--- a/components/sync_driver/generic_change_processor_unittest.cc
+++ b/components/sync_driver/generic_change_processor_unittest.cc
@@ -374,8 +374,8 @@ TEST_F(SyncGenericChangeProcessorTest,
pref_specifics->set_name("test");
syncer::AttachmentIdList attachment_ids;
- attachment_ids.push_back(syncer::AttachmentId::Create(0, 0));
- attachment_ids.push_back(syncer::AttachmentId::Create(0, 0));
+ attachment_ids.push_back(syncer::AttachmentId::Create());
+ attachment_ids.push_back(syncer::AttachmentId::Create());
// Add a SyncData with two attachments.
syncer::SyncChangeList change_list;
@@ -398,7 +398,7 @@ TEST_F(SyncGenericChangeProcessorTest,
// Update the SyncData, replacing its two attachments with one new attachment.
syncer::AttachmentIdList new_attachment_ids;
- new_attachment_ids.push_back(syncer::AttachmentId::Create(0, 0));
+ new_attachment_ids.push_back(syncer::AttachmentId::Create());
mock_attachment_service()->attachment_id_sets()->clear();
change_list.clear();
change_list.push_back(
@@ -428,7 +428,7 @@ TEST_F(SyncGenericChangeProcessorTest, AttachmentUploaded) {
pref_specifics->set_name("test");
syncer::AttachmentIdList attachment_ids;
- attachment_ids.push_back(syncer::AttachmentId::Create(0, 0));
+ attachment_ids.push_back(syncer::AttachmentId::Create());
// Add a SyncData with two attachments.
syncer::SyncChangeList change_list;
@@ -456,8 +456,8 @@ TEST_F(SyncGenericChangeProcessorTest, AttachmentUploaded) {
// scheduled for upload.
TEST_F(SyncGenericChangeProcessorTest, UploadAllAttachmentsNotOnServer) {
// Create two attachment ids. id2 will be marked as "on server".
- syncer::AttachmentId id1 = syncer::AttachmentId::Create(0, 0);
- syncer::AttachmentId id2 = syncer::AttachmentId::Create(0, 0);
+ syncer::AttachmentId id1 = syncer::AttachmentId::Create();
+ syncer::AttachmentId id2 = syncer::AttachmentId::Create();
{
// Write an entry containing these two attachment ids.
syncer::WriteTransaction trans(FROM_HERE, user_share());