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

Unified Diff: components/sync_driver/generic_change_processor.h

Issue 567053002: Pass AttachmentIdList instead of AttachmentList to SyncData (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Fix test. Apply feedback. Created 6 years, 3 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 | « no previous file | components/sync_driver/generic_change_processor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync_driver/generic_change_processor.h
diff --git a/components/sync_driver/generic_change_processor.h b/components/sync_driver/generic_change_processor.h
index afd1ba3915158e62a71bb5c1a3312b76a994190a..f76fba5e9d4a92f188d7d57594d2cc667bd019c7 100644
--- a/components/sync_driver/generic_change_processor.h
+++ b/components/sync_driver/generic_change_processor.h
@@ -117,30 +117,25 @@ class GenericChangeProcessor : public ChangeProcessor,
const syncer::ModelType& type,
const syncer::WriteTransaction& trans,
syncer::WriteNode* sync_node,
- syncer::AttachmentList* new_attachments);
+ syncer::AttachmentIdList* new_attachments);
// Logically part of ProcessSyncChanges.
//
// |new_attachments| is an output parameter containing newly added attachments
// that need to be stored. This method will append to it.
- syncer::SyncError HandleActionUpdate(const syncer::SyncChange& change,
- const std::string& type_str,
- const syncer::ModelType& type,
- const syncer::WriteTransaction& trans,
- syncer::WriteNode* sync_node,
- syncer::AttachmentList* new_attachments);
-
- // Store |attachments| locally then upload them to the sync server.
+ syncer::SyncError HandleActionUpdate(
+ const syncer::SyncChange& change,
+ const std::string& type_str,
+ const syncer::ModelType& type,
+ const syncer::WriteTransaction& trans,
+ syncer::WriteNode* sync_node,
+ syncer::AttachmentIdList* new_attachments);
+
+ // Upload |attachments| to the sync server.
//
- // Store and uploading are asynchronous operations. |WriteAttachmentsDone|
- // will be invoked once the attachments have been stored on the local device.
- void StoreAndUploadAttachments(const syncer::AttachmentList& attachments);
-
- // Invoked once attachments have been stored locally.
- //
- // See also AttachmentStore::WriteCallback.
- void WriteAttachmentsDone(const syncer::AttachmentList& attachments,
- const syncer::AttachmentStore::Result& result);
+ // This function assumes that attachments were already stored in
+ // AttachmentStore.
+ void UploadAttachments(const syncer::AttachmentIdList& attachment_ids);
// The SyncableService this change processor will forward changes on to.
const base::WeakPtr<syncer::SyncableService> local_service_;
« no previous file with comments | « no previous file | components/sync_driver/generic_change_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698