The logic to calculate WebHistory.LocalResultMissingOnServer is currently wrong, and thus can hit a DCHECK. The local_result_count is pre-pending, and the missing_count is post-pending.
The current logic tries is trying to preserve pre-duplicated counts as well, which we do not need to continue to support. They're already being deduped by the local db, so at this point we've lost the true information anyways. We should probably be able to simply iterate over results and count up LOCAL / (LOCAL + COMBINED).
Comment 1 by bugdroid1@chromium.org
, Oct 21 2017