Commit f57f0ad1 authored by Francois Doray's avatar Francois Doray Committed by Commit Bot

CHECK that OnURLsDeleted() receives info for all deleted origins.

A developer reported a failure in the DCHECK that verifies that
LocalSiteCharacteristicsDataStore::OnURLsDeleted() receives details
for the origin of all deleted URLs.

This CL transforms the DCHECK into a CHECK to determine whether this
can happen in production.

Bug: 966059
Change-Id: Ia3328ca7d832935ee906ddb5570aa3035a65c0ec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1749248
Commit-Queue: Sébastien Marchand <sebmarchand@chromium.org>
Reviewed-by: default avatarSébastien Marchand <sebmarchand@chromium.org>
Cr-Commit-Position: refs/heads/master@{#686219}
parent f0028d30
......@@ -164,8 +164,11 @@ void LocalSiteCharacteristicsDataStore::OnURLsDeleted(
} else {
std::vector<url::Origin> origins_to_remove;
DCHECK_EQ(deletion_info.deleted_urls_origin_map().size(),
CountOriginsInURLRows(deletion_info.deleted_rows()));
// CHECK_EQ instead of DCHECK_EQ to determine whether
// https://crbug.com/966059 still happens in production.
// TODO(fdoray): Remove once https://crbug.com/966059 is fixed.
CHECK_EQ(deletion_info.deleted_urls_origin_map().size(),
CountOriginsInURLRows(deletion_info.deleted_rows()));
for (const auto& it : deletion_info.deleted_urls_origin_map()) {
const url::Origin origin = url::Origin::Create(it.first);
const int remaining_visits_in_history = it.second.first;
......
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