Commit 87780241 authored by Jan Krcal's avatar Jan Krcal Committed by Commit Bot

[Wallet metadata] Relax a DCHECK in old wallet metadata sync

This CL relaxes a DCHECK that is unnecessarily strict. It enforced
something this syncable service does not care about (that there are no
CREATED notifications for entities we already know of). This is more
appropriate in the new implementation (where it matters and is easier
to argue about in the code) and will be added by a separate CL.

Bug: 912567
Change-Id: I4ae03ef383980ad536d88549f2971fe8ce8ce373
Reviewed-on: https://chromium-review.googlesource.com/c/1454585Reviewed-by: default avatarSebastien Seguin-Gagnon <sebsg@chromium.org>
Commit-Queue: Sebastien Seguin-Gagnon <sebsg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#629187}
parent df740f5c
......@@ -567,8 +567,11 @@ void AutofillWalletMetadataSyncableService::CreditCardChanged(
server_id, sync_pb::WalletMetadataSpecifics::CARD, &cache_);
if (it == cache_.end())
return;
// Implicitly, we filter out ADD (not in cache) and REMOVE (!data_model()).
DCHECK(change.type() == AutofillProfileChange::UPDATE);
// Deletions and creations are treated by Wallet data sync (and propagated
// here by AutofillMultipleChanged()). We only treat updates here.
if (change.type() != AutofillProfileChange::UPDATE) {
return;
}
const sync_pb::WalletMetadataSpecifics& remote =
it->GetSpecifics().wallet_metadata();
......
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