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

Issue 982883002: [Sync] Add size and crc32c to AttachmentId. (Closed)

Created:
5 years, 9 months ago by maniscalco
Modified:
5 years, 9 months ago
Reviewers:
pavely
CC:
chromium-reviews, tim+watch_chromium.org, zea+watch_chromium.org, maxbogue+watch_chromium.org, pvalenzuela+watch_chromium.org, albertb+watch_chromium.org, maniscalco+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

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} Committed: https://crrev.com/4c80a31653994ec6f112985b3493b1809e8e3415 Cr-Commit-Position: refs/heads/master@{#320103}

Patch Set 1 #

Patch Set 2 : Self-review. #

Patch Set 3 : Fix compile on windows by including basictypes.h. #

Patch Set 4 : Fix argument evaluation order bug. #

Total comments: 8

Patch Set 5 : Maintain spirit of AttachmentStoreTest.Write_NoOverwriteNoError. #

Patch Set 6 : Apply CR feedback from pavely. #

Patch Set 7 : Add two more test cases. #

Patch Set 8 : Merge with master. #

Patch Set 9 : Merge with master. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+221 lines, -121 lines) Patch
M components/sync_driver/generic_change_processor_unittest.cc View 1 2 3 4 5 6 7 4 chunks +6 lines, -6 lines 0 comments Download
M sync/api/attachments/attachment.h View 2 chunks +3 lines, -6 lines 0 comments Download
M sync/api/attachments/attachment.cc View 2 chunks +9 lines, -8 lines 0 comments Download
M sync/api/attachments/attachment_id.h View 1 1 chunk +12 lines, -2 lines 0 comments Download
M sync/api/attachments/attachment_id.cc View 2 chunks +10 lines, -2 lines 0 comments Download
M sync/api/attachments/attachment_id_unittest.cc View 1 1 chunk +5 lines, -9 lines 0 comments Download
M sync/api/attachments/attachment_metadata.h View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M sync/api/attachments/attachment_metadata_unittest.cc View 1 chunk +2 lines, -1 line 0 comments Download
M sync/api/attachments/attachment_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M sync/api/sync_data_unittest.cc View 1 1 chunk +3 lines, -3 lines 0 comments Download
M sync/engine/directory_commit_contribution_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M sync/engine/directory_update_handler_unittest.cc View 1 3 chunks +7 lines, -5 lines 0 comments Download
M sync/internal_api/attachments/attachment_downloader_impl.cc View 1 2 3 4 5 5 chunks +11 lines, -6 lines 0 comments Download
M sync/internal_api/attachments/attachment_downloader_impl_unittest.cc View 1 2 3 4 5 6 11 chunks +32 lines, -9 lines 0 comments Download
M sync/internal_api/attachments/attachment_service_impl_unittest.cc View 1 2 3 4 5 6 7 12 chunks +16 lines, -20 lines 0 comments Download
M sync/internal_api/attachments/attachment_store_test_template.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -3 lines 0 comments Download
M sync/internal_api/attachments/attachment_uploader_impl_unittest.cc View 4 chunks +4 lines, -4 lines 0 comments Download
M sync/internal_api/attachments/fake_attachment_downloader.cc View 1 chunk +1 line, -2 lines 0 comments Download
M sync/internal_api/attachments/fake_attachment_downloader_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M sync/internal_api/attachments/on_disk_attachment_store.cc View 1 2 3 4 5 6 7 1 chunk +10 lines, -4 lines 0 comments Download
M sync/internal_api/attachments/on_disk_attachment_store_unittest.cc View 1 2 3 4 5 6 7 5 chunks +51 lines, -10 lines 0 comments Download
M sync/internal_api/public/attachments/attachment_downloader_impl.h View 1 chunk +1 line, -2 lines 0 comments Download
M sync/internal_api/public/base/attachment_id_proto.h View 1 2 2 chunks +8 lines, -1 line 0 comments Download
M sync/internal_api/public/base/attachment_id_proto.cc View 1 chunk +4 lines, -1 line 0 comments Download
M sync/internal_api/public/base/attachment_id_proto_unittest.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M sync/internal_api/sync_manager_impl_unittest.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M sync/protocol/attachments.proto View 1 1 chunk +4 lines, -0 lines 0 comments Download
M sync/syncable/directory_unittest.cc View 5 chunks +6 lines, -6 lines 0 comments Download

Messages

Total messages: 18 (5 generated)
maniscalco
Pavel, would you please review this change? Side note, yesterday I was looking for the ...
5 years, 9 months ago (2015-03-05 18:20:21 UTC) #2
maniscalco
On 2015/03/05 18:20:21, maniscalco wrote: > Pavel, would you please review this change? > > ...
5 years, 9 months ago (2015-03-07 00:07:01 UTC) #3
pavely
lgtm with few comments. https://codereview.chromium.org/982883002/diff/60001/sync/api/attachments/attachment_metadata_unittest.cc File sync/api/attachments/attachment_metadata_unittest.cc (right): https://codereview.chromium.org/982883002/diff/60001/sync/api/attachments/attachment_metadata_unittest.cc#newcode17 sync/api/attachments/attachment_metadata_unittest.cc:17: AttachmentMetadata metadata(id, size); Now AttachmentMetadata ...
5 years, 9 months ago (2015-03-07 00:07:25 UTC) #4
maniscalco
Thanks for the feedback. All applied. https://codereview.chromium.org/982883002/diff/60001/sync/api/attachments/attachment_metadata_unittest.cc File sync/api/attachments/attachment_metadata_unittest.cc (right): https://codereview.chromium.org/982883002/diff/60001/sync/api/attachments/attachment_metadata_unittest.cc#newcode17 sync/api/attachments/attachment_metadata_unittest.cc:17: AttachmentMetadata metadata(id, size); ...
5 years, 9 months ago (2015-03-09 17:09:00 UTC) #5
pavely
still lgtm
5 years, 9 months ago (2015-03-09 18:14:06 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/982883002/140001
5 years, 9 months ago (2015-03-09 21:56:48 UTC) #9
commit-bot: I haz the power
Committed patchset #8 (id:140001)
5 years, 9 months ago (2015-03-10 00:40:52 UTC) #10
commit-bot: I haz the power
Patchset 8 (id:??) landed as https://crrev.com/23ae3128db0d84a6b1ffa640568a5ec90cfc8808 Cr-Commit-Position: refs/heads/master@{#319794}
5 years, 9 months ago (2015-03-10 00:41:48 UTC) #11
dgrogan
A revert of this CL (patchset #8 id:140001) has been created in https://codereview.chromium.org/995683002/ by dgrogan@chromium.org. ...
5 years, 9 months ago (2015-03-10 01:32:17 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/982883002/160001
5 years, 9 months ago (2015-03-11 16:28:24 UTC) #15
maniscalco
On 2015/03/11 16:28:24, I haz the power (commit-bot) wrote: > CQ is trying da patch. ...
5 years, 9 months ago (2015-03-11 17:11:57 UTC) #16
commit-bot: I haz the power
Committed patchset #9 (id:160001)
5 years, 9 months ago (2015-03-11 17:36:42 UTC) #17
commit-bot: I haz the power
5 years, 9 months ago (2015-03-11 17:37:44 UTC) #18
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/4c80a31653994ec6f112985b3493b1809e8e3415
Cr-Commit-Position: refs/heads/master@{#320103}

Powered by Google App Engine
This is Rietveld 408576698