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

Unified Diff: sync/api/attachments/attachment_store.h

Issue 293143002: Add AttachmentDownloader interface, change signature of AttachmentStore::Read (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes after feedback from Nick Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/api/attachments/attachment_service_impl.cc ('k') | sync/api/attachments/attachment_uploader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/api/attachments/attachment_store.h
diff --git a/sync/api/attachments/attachment_store.h b/sync/api/attachments/attachment_store.h
index d86cd1b81a779515c48241891d2c7c5bbdc1ab3d..b8834e0251f9da2e88e368f15151b49422c783b7 100644
--- a/sync/api/attachments/attachment_store.h
+++ b/sync/api/attachments/attachment_store.h
@@ -38,17 +38,21 @@ class SYNC_EXPORT AttachmentStore {
UNSPECIFIED_ERROR, // An unspecified error occurred for one or more items.
};
- typedef base::Callback<void(const Result&, scoped_ptr<AttachmentMap>)>
- ReadCallback;
+ typedef base::Callback<void(const Result&,
+ scoped_ptr<AttachmentMap>,
+ scoped_ptr<AttachmentIdList>)> ReadCallback;
typedef base::Callback<void(const Result&)> WriteCallback;
typedef base::Callback<void(const Result&)> DropCallback;
// Asynchronously reads the attachments identified by |ids|.
//
- // |callback| will be invoked when finished. If any of the attachments do not
- // exist or could not be read, |callback|'s Result will be UNSPECIFIED_ERROR
- // and |callback| may receive a partial result. That is, AttachmentMap may be
- // empty or may contain the attachments that were read successfully.
+ // |callback| will be invoked when finished. AttachmentStore will attempt to
+ // read all attachments specified in ids. If any of the attachments do not
+ // exist or could not be read, |callback|'s Result will be UNSPECIFIED_ERROR.
+ // Callback's AttachmentMap will contain all attachments that were
+ // successfully read, AttachmentIdList will contain attachment ids of
+ // attachments that are unavailable in attachment store, these need to be
+ // downloaded from server.
//
// Reads on individual attachments are treated atomically; |callback| will not
// read only part of an attachment.
« no previous file with comments | « sync/api/attachments/attachment_service_impl.cc ('k') | sync/api/attachments/attachment_uploader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698