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

Issue 264793007: Keep track of which attachments are referenced by which sync entries. (Closed)

Created:
6 years, 7 months ago by maniscalco
Modified:
6 years, 7 months ago
Reviewers:
pavely
CC:
chromium-reviews, tim+watch_chromium.org, haitaol+watch_chromium.org, albertb+watch_chromium.org, maniscalco+watch_chromium.org
Visibility:
Public.

Description

Keep track of which attachments are referenced by which sync entries. Relanding https://codereview.chromium.org/247983002/ after fixing memory leak. PutAttachmentMetadata on MutableEntry now notifies the Directory when the attachments associated with an entry change. Give Directory::InitializeIndices a ScopedKernelLock to be consistent and make it easier to ensure we are locking when we need to. GenericChangeProcess passes new attachments to AttachmentService for storage and upload. Add an output parameter to GenericChangeProcessor's HandleActionAdd and HandleActionUpdate methods so they can keep track of potentially new attachments and pass them to AttachmentService for storage/upload. Convert AttachmentService's OnSyncDataAdd to StoreAttachments. Implement HasAttachmentNotOnServer. BUG=348625, 353303, 354530, 356266 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=267887

Patch Set 1 : https://codereview.chromium.org/247983002/ #

Patch Set 2 : Fix memory leak. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+853 lines, -167 lines) Patch
M components/sync_driver/generic_change_processor.h View 1 chunk +13 lines, -4 lines 0 comments Download
M components/sync_driver/generic_change_processor.cc View 10 chunks +92 lines, -25 lines 0 comments Download
M components/sync_driver/generic_change_processor_unittest.cc View 1 6 chunks +108 lines, -8 lines 0 comments Download
M sync/api/attachments/attachment_id.cc View 2 chunks +2 lines, -5 lines 0 comments Download
M sync/api/attachments/attachment_service.h View 2 chunks +18 lines, -5 lines 0 comments Download
M sync/api/attachments/attachment_service_proxy.h View 2 chunks +4 lines, -2 lines 0 comments Download
M sync/api/attachments/attachment_service_proxy.cc View 3 chunks +21 lines, -4 lines 0 comments Download
M sync/api/attachments/attachment_service_proxy_unittest.cc View 6 chunks +20 lines, -4 lines 0 comments Download
M sync/api/attachments/fake_attachment_service.h View 2 chunks +4 lines, -1 line 0 comments Download
M sync/api/attachments/fake_attachment_service.cc View 2 chunks +20 lines, -3 lines 0 comments Download
M sync/api/sync_data.h View 1 chunk +10 lines, -5 lines 0 comments Download
M sync/api/sync_data.cc View 3 chunks +16 lines, -6 lines 0 comments Download
M sync/engine/get_commit_ids.cc View 1 chunk +7 lines, -3 lines 0 comments Download
M sync/internal_api/base_node.cc View 1 chunk +7 lines, -4 lines 0 comments Download
A sync/internal_api/public/base/attachment_id_proto.h View 1 chunk +20 lines, -0 lines 0 comments Download
A sync/internal_api/public/base/attachment_id_proto.cc View 1 chunk +19 lines, -0 lines 0 comments Download
M sync/internal_api/public/base_transaction.h View 1 chunk +3 lines, -0 lines 0 comments Download
M sync/internal_api/public/write_node.h View 1 chunk +4 lines, -0 lines 0 comments Download
M sync/internal_api/sync_manager_impl_unittest.cc View 20 chunks +167 lines, -72 lines 0 comments Download
M sync/internal_api/write_node.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M sync/protocol/attachments.proto View 1 chunk +9 lines, -0 lines 0 comments Download
M sync/sync_internal_api.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
M sync/syncable/directory.h View 6 chunks +43 lines, -1 line 0 comments Download
M sync/syncable/directory.cc View 10 chunks +68 lines, -2 lines 0 comments Download
M sync/syncable/directory_backing_store.cc View 2 chunks +9 lines, -0 lines 0 comments Download
M sync/syncable/directory_unittest.h View 2 chunks +15 lines, -4 lines 0 comments Download
M sync/syncable/directory_unittest.cc View 5 chunks +126 lines, -9 lines 0 comments Download
M sync/syncable/entry_kernel.h View 1 chunk +4 lines, -0 lines 0 comments Download
M sync/syncable/mutable_entry.h View 1 chunk +3 lines, -0 lines 0 comments Download
M sync/syncable/mutable_entry.cc View 1 chunk +14 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
maniscalco
Pavel, would you please review this change? You previously reviewed https://codereview.chromium.org/247983002/, which I reverted because ...
6 years, 7 months ago (2014-05-02 00:30:38 UTC) #1
maniscalco
On 2014/05/02 00:30:38, maniscalco wrote: > Pavel, would you please review this change? You previously ...
6 years, 7 months ago (2014-05-02 00:33:21 UTC) #2
pavely
lgtm
6 years, 7 months ago (2014-05-02 16:34:45 UTC) #3
maniscalco
The CQ bit was checked by maniscalco@chromium.org
6 years, 7 months ago (2014-05-02 17:32:48 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/maniscalco@chromium.org/264793007/20001
6 years, 7 months ago (2014-05-02 17:33:16 UTC) #5
commit-bot: I haz the power
6 years, 7 months ago (2014-05-02 19:00:12 UTC) #6
Message was sent while issue was closed.
Change committed as 267887

Powered by Google App Engine
This is Rietveld 408576698