summaryrefslogtreecommitdiffstats
path: root/sync/engine
diff options
context:
space:
mode:
Diffstat (limited to 'sync/engine')
-rw-r--r--sync/engine/get_commit_ids.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/sync/engine/get_commit_ids.cc b/sync/engine/get_commit_ids.cc
index 80222ee..5f91915 100644
--- a/sync/engine/get_commit_ids.cc
+++ b/sync/engine/get_commit_ids.cc
@@ -108,9 +108,13 @@ bool IsEntryInConflict(const syncable::Entry& entry) {
// Return true if this entry has any attachments that haven't yet been uploaded
// to the server.
bool HasAttachmentNotOnServer(const syncable::Entry& entry) {
- // TODO(maniscalco): Once AttachmentMetadata is fleshed out, implement this
- // function to return true if any of the attachments haven't been uploaded to
- // the server. Add test case (bug 356266).
+ // TODO(maniscalco): Add test case (bug 356266).
+ const sync_pb::AttachmentMetadata& metadata = entry.GetAttachmentMetadata();
+ for (int i = 0; i < metadata.record_size(); ++i) {
+ if (!metadata.record(i).is_on_server()) {
+ return true;
+ }
+ }
return false;
}