Commit 53dddb96 authored by Mikel Astiz's avatar Mikel Astiz Committed by Commit Bot

Relax DCHECKs about non_unique_name

Nothing really guarantees that a SyncableService (or a remote device)
populates the non-unique name with an empty string, so let's relax the
DCHECKs although they don't seem to fail in practice.

Bug: 870624
Change-Id: If26df0329c9749c0c2eb6b0768b8ae544b1c3879
Reviewed-on: https://chromium-review.googlesource.com/c/1442653Reviewed-by: default avatarJan Krcal <jkrcal@chromium.org>
Commit-Queue: Mikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#626992}
parent 89f30ac9
......@@ -31,7 +31,6 @@ std::unique_ptr<EntityData> ConvertPersistedToEntityData(
const std::string& client_tag_hash,
sync_pb::PersistedEntityData data) {
DCHECK(!client_tag_hash.empty());
DCHECK(!data.non_unique_name().empty());
auto entity_data = std::make_unique<EntityData>();
entity_data->non_unique_name = std::move(*data.mutable_non_unique_name());
......@@ -47,8 +46,6 @@ std::unique_ptr<EntityData> ConvertPersistedToEntityData(
sync_pb::PersistedEntityData CreatePersistedFromEntityData(
const EntityData& entity_data) {
DCHECK(!entity_data.non_unique_name.empty());
sync_pb::PersistedEntityData persisted;
persisted.set_non_unique_name(entity_data.non_unique_name);
*persisted.mutable_specifics() = entity_data.specifics;
......
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