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

Unified Diff: sync/engine/syncer_util.cc

Issue 393083004: Update Commit and GetUpdatesResponse messages to include attachment ids. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update SyncManagerImpl to detect attachment metadata changes. Created 6 years, 5 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/engine/get_commit_ids.cc ('k') | sync/internal_api/public/base/attachment_id_proto.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/syncer_util.cc
diff --git a/sync/engine/syncer_util.cc b/sync/engine/syncer_util.cc
index c7d93c19d040d1a4f98bf890e49fe8c46244e17e..3cb9bcaf7ec4670de7a4aedadf97765999a09bd0 100644
--- a/sync/engine/syncer_util.cc
+++ b/sync/engine/syncer_util.cc
@@ -17,6 +17,7 @@
#include "sync/engine/conflict_resolver.h"
#include "sync/engine/syncer_proto_util.h"
#include "sync/engine/syncer_types.h"
+#include "sync/internal_api/public/base/attachment_id_proto.h"
#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/base/unique_position.h"
#include "sync/protocol/bookmark_specifics.pb.h"
@@ -407,6 +408,8 @@ void UpdateServerFieldsFromUpdate(
bookmark.bookmark_favicon(),
target);
}
+ target->PutServerAttachmentMetadata(
+ CreateAttachmentMetadata(update.attachment_id()));
if (SyncerProtoUtil::ShouldMaintainPosition(update)) {
UpdateBookmarkPositioning(update, target);
}
@@ -463,6 +466,7 @@ void UpdateLocalDataFromServerData(
entry->PutBaseVersion(entry->GetServerVersion());
entry->PutIsDel(entry->GetServerIsDel());
entry->PutIsUnappliedUpdate(false);
+ entry->PutAttachmentMetadata(entry->GetServerAttachmentMetadata());
}
VerifyCommitResult ValidateCommitEntry(syncable::Entry* entry) {
« no previous file with comments | « sync/engine/get_commit_ids.cc ('k') | sync/internal_api/public/base/attachment_id_proto.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698