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

Issue 187303006: Update sync API to support attachments. (Closed)

Created:
6 years, 9 months ago by maniscalco
Modified:
6 years, 8 months ago
CC:
chromium-reviews, tim+watch_chromium.org, haitaol+watch_chromium.org, albertb+watch_chromium.org, maniscalco+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@attachmentapi
Visibility:
Public.

Description

Update sync API to support attachments. The purpose of this change is to start exposing attachment support in the sync API. At this point there is no real functionality added. SyncData and SyncChangeProcessor now know about attachments. GenericChangeProcessor's ctor now requires an AttachmentService. Add AttachmentService and FakeAttachmentService. Update Attachment::Create* methods to return by value. Make Attachment::CreateId public because it is useful in sync_data_unittest.cc. Make some ctors explicit. BUG=348624 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=260778

Patch Set 1 #

Patch Set 2 : Pull in upstream changes. #

Total comments: 26

Patch Set 3 : Apply some CR feedback. #

Patch Set 4 : Apply some CR feedback. #

Patch Set 5 : AttachmentId wraps a proto similar to SyncData/SyncEntity. #

Patch Set 6 : Replace WeakHandle with AttachmentServiceProxy. #

Patch Set 7 : Fix enum related compile errors on mac. #

Total comments: 2

Patch Set 8 : Add AttachmentServiceBase allowing us to drop AsWeakPtr and RefCountedThreadSafe from AttachmentServiceProxy. #

Total comments: 2

Patch Set 9 : Remove AttachmentServiceBase and require that GenericChangeProcessor invalidates WeakPtrs to Attach… #

Patch Set 10 : Remove AttachmentServiceBase for reals. #

Total comments: 7

Patch Set 11 : Rename GetAttachments to GetLocalAttachmentsForUpload. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1138 lines, -137 lines) Patch
M chrome/browser/sync/glue/fake_generic_change_processor.cc View 1 2 3 4 5 1 chunk +6 lines, -5 lines 0 comments Download
M chrome/browser/sync/glue/generic_change_processor.h View 1 2 3 4 5 6 7 8 9 3 chunks +11 lines, -1 line 0 comments Download
M chrome/browser/sync/glue/generic_change_processor.cc View 1 2 3 4 5 6 7 8 9 chunks +38 lines, -17 lines 0 comments Download
M chrome/browser/sync/glue/generic_change_processor_unittest.cc View 1 2 3 3 chunks +10 lines, -7 lines 0 comments Download
M chrome/browser/sync/profile_sync_components_factory_impl.cc View 1 2 3 4 5 6 7 8 2 chunks +16 lines, -4 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_autofill_unittest.cc View 1 2 3 4 5 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/sync/profile_sync_service_preference_unittest.cc View 1 2 3 4 5 2 chunks +7 lines, -4 lines 0 comments Download
M sync/api/attachments/attachment.h View 1 2 3 4 3 chunks +2 lines, -7 lines 0 comments Download
M sync/api/attachments/attachment.cc View 1 2 3 4 1 chunk +3 lines, -3 lines 0 comments Download
M sync/api/attachments/attachment_id.h View 1 2 3 4 2 chunks +29 lines, -4 lines 0 comments Download
M sync/api/attachments/attachment_id.cc View 1 2 3 4 5 2 chunks +45 lines, -6 lines 0 comments Download
A sync/api/attachments/attachment_service.h View 1 2 3 4 5 6 7 1 chunk +75 lines, -0 lines 0 comments Download
A + sync/api/attachments/attachment_service.cc View 1 chunk +3 lines, -3 lines 0 comments Download
A sync/api/attachments/attachment_service_proxy.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +70 lines, -0 lines 0 comments Download
A sync/api/attachments/attachment_service_proxy.cc View 1 2 3 4 5 6 7 1 chunk +103 lines, -0 lines 0 comments Download
A sync/api/attachments/attachment_service_proxy_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +229 lines, -0 lines 0 comments Download
M sync/api/attachments/attachment_store.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M sync/api/attachments/attachment_unittest.cc View 1 2 3 4 2 chunks +10 lines, -11 lines 0 comments Download
A sync/api/attachments/fake_attachment_service.h View 1 2 3 4 5 6 7 8 9 1 chunk +45 lines, -0 lines 0 comments Download
A sync/api/attachments/fake_attachment_service.cc View 1 2 3 4 5 6 7 8 1 chunk +72 lines, -0 lines 0 comments Download
M sync/api/attachments/fake_attachment_store.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M sync/api/attachments/fake_attachment_store.cc View 1 2 3 4 3 chunks +6 lines, -19 lines 0 comments Download
M sync/api/attachments/fake_attachment_store_unittest.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M sync/api/sync_change_processor.h View 1 2 3 2 chunks +17 lines, -0 lines 0 comments Download
M sync/api/sync_data.h View 1 2 3 4 5 6 7 8 9 10 6 chunks +75 lines, -7 lines 0 comments Download
M sync/api/sync_data.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +122 lines, -30 lines 0 comments Download
M sync/api/sync_data_unittest.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +75 lines, -3 lines 0 comments Download
M sync/internal_api/base_node.cc View 1 2 3 4 1 chunk +7 lines, -0 lines 0 comments Download
M sync/internal_api/public/DEPS View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M sync/internal_api/public/base_node.h View 1 2 3 4 2 chunks +4 lines, -0 lines 0 comments Download
A sync/protocol/attachments.proto View 1 2 3 4 1 chunk +22 lines, -0 lines 0 comments Download
M sync/protocol/proto_value_conversions.h View 1 2 3 4 5 2 chunks +4 lines, -0 lines 0 comments Download
M sync/protocol/proto_value_conversions.cc View 1 2 3 4 5 1 chunk +7 lines, -0 lines 0 comments Download
M sync/protocol/proto_value_conversions_unittest.cc View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M sync/protocol/sync.proto View 1 2 3 4 3 chunks +4 lines, -1 line 0 comments Download
M sync/sync_api.gypi View 1 2 3 4 5 8 1 chunk +7 lines, -0 lines 0 comments Download
M sync/sync_proto.gypi View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M sync/sync_tests.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
maniscalco
Hi Tim, mind reviewing this change? As you'll see there are a bunch of TODOs ...
6 years, 9 months ago (2014-03-06 00:48:23 UTC) #1
tim (not reviewing)
https://codereview.chromium.org/187303006/diff/20001/chrome/browser/sync/glue/generic_change_processor.cc File chrome/browser/sync/glue/generic_change_processor.cc (right): https://codereview.chromium.org/187303006/diff/20001/chrome/browser/sync/glue/generic_change_processor.cc#newcode78 chrome/browser/sync/glue/generic_change_processor.cc:78: attachment_service_weak_handle_( Do we actually need a weak_handle_ member? Is ...
6 years, 9 months ago (2014-03-10 22:55:57 UTC) #2
maniscalco
Thanks for the feedback! PTAL. https://codereview.chromium.org/187303006/diff/20001/chrome/browser/sync/glue/generic_change_processor.cc File chrome/browser/sync/glue/generic_change_processor.cc (right): https://codereview.chromium.org/187303006/diff/20001/chrome/browser/sync/glue/generic_change_processor.cc#newcode78 chrome/browser/sync/glue/generic_change_processor.cc:78: attachment_service_weak_handle_( On 2014/03/10 22:55:58, ...
6 years, 9 months ago (2014-03-18 20:49:18 UTC) #3
tim (not reviewing)
https://codereview.chromium.org/187303006/diff/20001/sync/api/sync_data.cc File sync/api/sync_data.cc (right): https://codereview.chromium.org/187303006/diff/20001/sync/api/sync_data.cc#newcode233 sync/api/sync_data.cc:233: attachment_service_.Call( On 2014/03/18 20:49:18, maniscalco wrote: > On 2014/03/10 ...
6 years, 9 months ago (2014-03-19 22:32:48 UTC) #4
maniscalco
All comments addressed, RFAL! Lots of changes since you last reviewed. https://codereview.chromium.org/187303006/diff/20001/sync/api/sync_data.cc File sync/api/sync_data.cc (right): ...
6 years, 9 months ago (2014-03-25 21:40:30 UTC) #5
maniscalco
BTW, based on our offline conversation earlier today, I've changed AttachmentServiceProxy so that it no ...
6 years, 9 months ago (2014-03-27 00:03:25 UTC) #6
tim (not reviewing)
https://codereview.chromium.org/187303006/diff/270001/sync/api/attachments/attachment_service_proxy.h File sync/api/attachments/attachment_service_proxy.h (right): https://codereview.chromium.org/187303006/diff/270001/sync/api/attachments/attachment_service_proxy.h#newcode38 sync/api/attachments/attachment_service_proxy.h:38: public base::RefCountedThreadSafe<AttachmentServiceProxy> { I still think having a hidden ...
6 years, 9 months ago (2014-03-27 17:01:43 UTC) #7
tim (not reviewing)
https://codereview.chromium.org/187303006/diff/270001/sync/api/attachments/attachment_service_proxy.h File sync/api/attachments/attachment_service_proxy.h (right): https://codereview.chromium.org/187303006/diff/270001/sync/api/attachments/attachment_service_proxy.h#newcode38 sync/api/attachments/attachment_service_proxy.h:38: public base::RefCountedThreadSafe<AttachmentServiceProxy> { On 2014/03/27 17:01:44, timsteele wrote: > ...
6 years, 9 months ago (2014-03-27 17:02:09 UTC) #8
maniscalco
(new patch uploaded) https://codereview.chromium.org/187303006/diff/330001/sync/api/attachments/attachment_service_base.h File sync/api/attachments/attachment_service_base.h (right): https://codereview.chromium.org/187303006/diff/330001/sync/api/attachments/attachment_service_base.h#newcode25 sync/api/attachments/attachment_service_base.h:25: virtual base::WeakPtr<AttachmentServiceBase> AsWeakPtr() = 0; On ...
6 years, 9 months ago (2014-03-27 17:36:24 UTC) #9
tim (not reviewing)
https://codereview.chromium.org/187303006/diff/350002/sync/api/attachments/attachment_service_proxy.h File sync/api/attachments/attachment_service_proxy.h (right): https://codereview.chromium.org/187303006/diff/350002/sync/api/attachments/attachment_service_proxy.h#newcode38 sync/api/attachments/attachment_service_proxy.h:38: nit: remove extra newline. https://codereview.chromium.org/187303006/diff/350002/sync/api/sync_data.h File sync/api/sync_data.h (right): https://codereview.chromium.org/187303006/diff/350002/sync/api/sync_data.h#newcode112 ...
6 years, 9 months ago (2014-03-27 18:35:45 UTC) #10
tim (not reviewing)
LGTM with comment addressed. https://codereview.chromium.org/187303006/diff/350002/sync/api/sync_data.h File sync/api/sync_data.h (right): https://codereview.chromium.org/187303006/diff/350002/sync/api/sync_data.h#newcode115 sync/api/sync_data.h:115: // Return a list of ...
6 years, 9 months ago (2014-03-27 19:16:43 UTC) #11
maniscalco
Thanks for the feedback. All applied. https://codereview.chromium.org/187303006/diff/350002/sync/api/attachments/attachment_service_proxy.h File sync/api/attachments/attachment_service_proxy.h (right): https://codereview.chromium.org/187303006/diff/350002/sync/api/attachments/attachment_service_proxy.h#newcode38 sync/api/attachments/attachment_service_proxy.h:38: On 2014/03/27 18:35:46, ...
6 years, 9 months ago (2014-03-27 21:17:30 UTC) #12
maniscalco
The CQ bit was checked by maniscalco@chromium.org
6 years, 8 months ago (2014-03-31 21:02:23 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/maniscalco@chromium.org/187303006/380001
6 years, 8 months ago (2014-03-31 21:03:47 UTC) #14
maniscalco
The CQ bit was unchecked by maniscalco@chromium.org
6 years, 8 months ago (2014-04-01 03:16:19 UTC) #15
maniscalco
The CQ bit was checked by maniscalco@chromium.org
6 years, 8 months ago (2014-04-01 03:16:42 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/maniscalco@chromium.org/187303006/380001
6 years, 8 months ago (2014-04-01 03:16:58 UTC) #17
commit-bot: I haz the power
6 years, 8 months ago (2014-04-01 05:04:50 UTC) #18
Message was sent while issue was closed.
Change committed as 260778

Powered by Google App Engine
This is Rietveld 408576698