Chromium Code Reviews| Index: sync/api/attachments/attachment_service.h |
| diff --git a/sync/api/attachments/attachment_service.h b/sync/api/attachments/attachment_service.h |
| index 9e5e25d1489afef08909549afa08ed1f36e74cc9..c9c4b3337259901ee826126cb0fc3c55f73d4123 100644 |
| --- a/sync/api/attachments/attachment_service.h |
| +++ b/sync/api/attachments/attachment_service.h |
| @@ -54,9 +54,23 @@ class SYNC_EXPORT AttachmentService { |
| typedef base::Callback<void(const StoreResult&)> StoreCallback; |
| + // An interface that embedder code implements to be notified about different |
| + // events that originate from AttachmentService. |
| + class Delegate { |
|
maniscalco
2014/05/09 18:12:11
I'm thinking about in which thread the delegate wi
pavely
2014/05/13 23:06:44
Done.
|
| + public: |
| + virtual ~Delegate() {} |
| + |
| + // Attachment is uploaded to server and attachment_id is updated with server |
| + // url. |
| + virtual void OnAttachmentUploaded(const AttachmentId& attachment_id) = 0; |
| + }; |
| + |
| AttachmentService(); |
| virtual ~AttachmentService(); |
| + // Set delegate pointer. AttachmentService doesn't own delegate. |
|
maniscalco
2014/05/09 18:12:11
Can we avoid adding a no-op implementation here?
pavely
2014/05/13 23:06:44
The reason was to not add implementation of it to
|
| + virtual void SetDelegate(Delegate* delegate) {} |
|
maniscalco
2014/05/09 18:12:11
In the future we may move the delegate functionali
pavely
2014/05/13 23:06:44
Right now interface simple, explicit and will blow
|
| + |
| // See SyncData::GetOrDownloadAttachments. |
| virtual void GetOrDownloadAttachments( |
| const AttachmentIdList& attachment_ids, |