Commit c20462f6 authored by Mohamed Amir Yosef's avatar Mohamed Amir Yosef Committed by Commit Bot

[Sync::USS] Don't populate client_defined_unique_tag for bookmarks

The server identifies bookmark commit requests by the absence of a
client_defined_unique_tag.
Bookmarks should be handled differently when generating server ids.

This CL makes sure the client_defined_unique_tag is only populated
for non-bookmark data types.

Bug: 516866
Change-Id: I0c3b1f314c638878fd8780663484aec780215e99
Reviewed-on: https://chromium-review.googlesource.com/1169052
Commit-Queue: Mohamed Amir Yosef <mamir@chromium.org>
Reviewed-by: default avatarMikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#581878}
parent 9d596c89
......@@ -173,7 +173,10 @@ void NonBlockingTypeCommitContribution::PopulateCommitProto(
sync_pb::SyncEntity* commit_proto) {
const EntityData& entity_data = commit_entity.entity.value();
commit_proto->set_id_string(entity_data.id);
commit_proto->set_client_defined_unique_tag(entity_data.client_tag_hash);
// Populate client_defined_unique_tag only for non-bookmark data types.
if (!entity_data.specifics.has_bookmark()) {
commit_proto->set_client_defined_unique_tag(entity_data.client_tag_hash);
}
commit_proto->set_version(commit_entity.base_version);
commit_proto->set_deleted(entity_data.is_deleted());
commit_proto->set_folder(entity_data.is_folder);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment